Need help setting up a cron job for updating
I want to set up a cron job to run this series of commands...
I've heard this (the series of emerge commands and revdep-rebuild) is the most effective way of doing it, as it syncs, updates, removes unnecessary files, and fills in any files that might have been needed when removing unnecessary files.
xterm -e "emerge sync && emerge -uDN && emerge depclean && revdep-rebuild"
so, what would i add to this command to make a non-root user run this (since only root can run emerge)? or, is there another way to allow a non-root user to run this? also, does this command look like it would work well...it did when i opened xterm, logged in as root, then typed the command exactly as is.
i really don't want to restart into X as a root each night so that i can run a cron job...i'm sure i would forget most of the time.
i've been looking for an answer to this for a while. i even looked through xterm's really long man pages for a command that might allow me to use root temporarily, but as i was rushing through it (the man pages are huge) i might've missed it if there is one. or maybe there isn't one..?
thanks in advance! :)