Ubuntu sudo shell redirection

From richud.com
Jump to: navigation, search


Sudo shell redirection

doesn't work

echo deadline | sudo tee /sys/block/sda/queue/scheduler

does work

sudo sh -c "echo deadline > /sys/block/sda/queue/scheduler"