Command Line Help

Dennis Ruzeski dennisr at corp.kanoodle.com
Wed Dec 15 13:33:51 EST 2004


su -c "apt-get"

You can put it in a script and if you want to get really creative you can use expect and automate the whole process, root password and all.

Of course, you could just run it periodically in root's cron as well.

--Dennis



-----Original Message-----
From: Jesse Jarzynka [mailto:denisesballs at thecybersource.com]
Sent: Wednesday, December 15, 2004 1:26 PM
To: nflug at nflug.org
Subject: Command Line Help
Importance: Low


I thought it would be cool to have a desktop shortcut to run my apt-get
update/upgrade with. I wanted to be able to click it, and then run
"apt-get update && apt-get upgrade" in the terminal. However I do want
to become root first, so I tried "su && apt-get update && apt-get
upgrade" and it does then ask me for root password in the terminal but
then it doesn't seem to be doing anything. When I exit from root, then
it runs the other commands, I think because thats who I ran it as. Is
there a better way of becoming root and then running commands all at
once? Or another way to become root, and then run commands as root all
from one command? -Jesse




More information about the nflug mailing list