Possible Duplicate:
sudo permission denied but su grants permission
I am trying to echo a new value into a file using following command
sudo echo 4096 > /proc/sys/fs/file-max
The error coming is permission denied.But when I do the same thing as a root user I am successful.Can I know the reason why it happens or we can say that sudo doesnt pass through the ">" operator
echo 4096 | sudo tee /proc/sys/fs/file-max
– maco May 10 '11 at 19:06dd
ortee
for this, as long as you don't accidentially mistype "/dev/sda1" instead of "/proc/sys/fs/file-max" :) – u1686_grawity May 10 '11 at 20:39