Women in Technology

Hear us Roar



Article:
  Learning the Mac OS X Terminal, Part 5
Subject:   Nice!
Date:   2002-07-05 00:12:51
From:   tjj
Thank you once again for a very informative piece!
I have been using a rather inelegant solution to back up. An apple script with a terminal command using rsync. The script is started from system's crontab. I gather I will have problems with resource forks..I back up my entire ~ folder. If I ditto this (1.5 Gb) it takes about seven minutes. I haven't yet tried the suggested RsyncX. Ditto's man page states that it must be run as root, does this imply that you will have troubles ditto'ing files that is not owned by root? I also use an apple script to start a terminal session that in turn starts the command line scan engine from Virex. This script is started from root's crontab. If I start this from a user crontab will it still be able to scan system files?
Obviously I'm going to try to write shell scripts to do these jobs, but I'm not sure if they should be run from root's crontab or a user's.
Keep the articles comin';)
Regards Thomas Jon


Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Chris Stone photo Nice!
    2002-07-10 13:33:20  Chris Stone | O'Reilly AuthorO'Reilly Blogger [View]

    You're welcome, Thomas. Glad you liked the article.

    Contrary to what the man page states, you don't need to be root to run ditto.

    Also, if you need access to system files, or other files your account hasn't acces to withough sudo , you'll want to use a root crontab (not to be confused with the system crontab we looked at earlier).

    To do this, first get a root shell session with sudo -s, and then follow the same steps you did to create a user crontab. When you're done, type exit to leave the root shell session.

    BE CAREFUL, though....a root crontab can really make a mess of things if you've not set it up right, and it will do so at regularly scheduled intervals...;-)

    --Chris