![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cron job starts new cron proccess | ron76 | SUN Solaris | 3 | 05-11-2008 10:07 PM |
| Cron and Pseudo-Cron | dingusmcghee | UNIX for Dummies Questions & Answers | 1 | 01-31-2008 09:58 AM |
| CRON usage for CRON job | skyineyes | UNIX for Dummies Questions & Answers | 1 | 01-17-2008 07:17 AM |
| AIX and cron logs filtering ?: /etc/cronlog.conf, /var/adm/cron/log | Keith Johnson | AIX | 0 | 01-09-2008 05:32 PM |
| Cron : you are not authorized to use cron. Sorry. | tt155 | UNIX for Advanced & Expert Users | 1 | 07-06-2005 07:37 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Where does cron run from?
I have a script in the same directory as some files and directories im trying to tar up and I have it run in cron. Well it runs but says it can't find the directories, you need to be in the directory where the script is for it to work. Here is my cron and script its crappy but it does the trick =). Is there anyway in cron or my script to get this script to run correctly?
0,5,10,15,20,25,30,35,40,45,50,55 * * * * tmp/daily_backups/daily_backup.pl $dirtocopy = '/tmp/daily_backups/'; $backupfile = 'backup.tar'; print "Tar'n up directories... \n"; print `tar -cf backup.tar Baro Nitro Turbo`; print "Done Tar'n directories... \n"; print "Backing up $dirtocopy$backupfile \n"; print `ls | grep backup.tar | cpio -ocB > /dev/rmt/0`; print "Backup is now complete... \n"; print "Rewinding tape... \n"; print `mt -f /dev/rmt/0 rewind`; print "Tape rewound..."; |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
You just need to change to the directory before you begin tarring. The line before the tar command should be "cd /tmp/daily_backups" for example.
Carl |
|
#3
|
|||
|
|||
|
Thanks! Are there any limits on how big a tar file can be, or file size that will let me tar it.
|
|
#4
|
|||
|
|||
|
That depends on several factors... older versions of tar, the filesystem the tar is being saved to, and the operating system itself can all limit the maximum tar size to 2 gigabytes under some situations. If you dodge all these bullets, the theoretical max is extremely large.
|
|||
| Google The UNIX and Linux Forums |