hi,
I've got this command line that flushes the disk cache on Linux 2.6.16 and later that's very useful to clean big video files from RAM:
sudo sync; sudo echo 1 > /proc/sys/vm/drop_caches
Any of you has an idea how to give a [sudo cmd( message to the [shell] object and on-interactively give the sudo password?
++ O.
Olivier Heinry wrote:
hi,
I've got this command line that flushes the disk cache on Linux 2.6.16 and later that's very useful to clean big video files from RAM:
sudo sync; sudo echo 1 > /proc/sys/vm/drop_caches
Any of you has an idea how to give a [sudo cmd( message to the [shell] object and on-interactively give the sudo password?
One way is to exclude these commands from needing the password via http://lists.debian.org/debian-user/2004/02/msg00656.html
Another way is pipelining stdin: echo "YOURPASSWORD"|sudo sync; ...
or for some real shell programming and using a textfile for stdin: http://www.tldp.org/LDP/abs/html/io-redirection.html
"Prisons are needed only to provide the illusion that courts and police are effective. They're a kind of job insurance." (Leto II. in: Frank Herbert, God Emperor of Dune) http://thomas.dergrossebruder.org/
Le Mon, 28 Apr 2008 12:13:10 +0200, Thomas Mayer thomas@dergrossebruder.org a écrit :
Olivier Heinry wrote:
hi,
I've got this command line that flushes the disk cache on Linux 2.6.16 and later that's very useful to clean big video files from RAM:
sudo sync; sudo echo 1 > /proc/sys/vm/drop_caches
Any of you has an idea how to give a [sudo cmd( message to the [shell] object and on-interactively give the sudo password?
One way is to exclude these commands from needing the password via http://lists.debian.org/debian-user/2004/02/msg00656.html
Another way is pipelining stdin: echo "YOURPASSWORD"|sudo sync; ...
or for some real shell programming and using a textfile for stdin: http://www.tldp.org/LDP/abs/html/io-redirection.html
cu Thomas
Thanks big brother, i've added it to Pdpedia tips and tricks
++ O.
Olivier Heinry wrote:
Le Mon, 28 Apr 2008 12:13:10 +0200, Thomas Mayer thomas@dergrossebruder.org a écrit :
Olivier Heinry wrote:
hi,
I've got this command line that flushes the disk cache on Linux 2.6.16 and later that's very useful to clean big video files from RAM:
sudo sync; sudo echo 1 > /proc/sys/vm/drop_caches
Any of you has an idea how to give a [sudo cmd( message to the [shell] object and on-interactively give the sudo password?
One way is to exclude these commands from needing the password via http://lists.debian.org/debian-user/2004/02/msg00656.html
Another way is pipelining stdin: echo "YOURPASSWORD"|sudo sync; ...
or for some real shell programming and using a textfile for stdin: http://www.tldp.org/LDP/abs/html/io-redirection.html
cu Thomas
Thanks big brother, i've added it to Pdpedia tips and tricks
Thanks, I have elaborated the part a bit, and added pros and cons for the three methods.
"Prisons are needed only to provide the illusion that courts and police are effective. They're a kind of job insurance." (Leto II. in: Frank Herbert, God Emperor of Dune) http://thomas.dergrossebruder.org/