Date: Mon, 4 Dec 2000 15:00:41 +0100 (MET) From: "Hans Johannsson" <hj72@everyday.com> To: cam@bsdfr.org Cc: freebsd-questions@FreeBSD.ORG Subject: SV: CRON ?! Executable file ?! Message-ID: <200012041400.PAA20990@epsilon.swip.net>
next in thread | raw e-mail | index | archive | help
Wow....Thats a little bit too advanced for me....:).....could you please do a short explanation for the each step. On Mon, 4 Dec 2000 14:18:28 +0100 (MET) > "Hans Johannsson" <hj72@everyday.com> wrote: > > > Hi. > > Im running a freebsd version called IPSO. Its kinda like a stripped > freebsd version 4.0 or later i think. > > Id like to start CRON jobs. I know how to make the cron -e command, > and > how to configure the time or date i want it to execute, but i cant get > it > to execute the commands ive typed into a file. I made a file in VI. I > dont > know if thats the right thing. And saved it with the regular :w , :q! . > > I want to use CRON to take backups of files, every sunday. > > The vi file contains the dirs and files i want to backup. > > Anyone know how to help me out ?! > > > > /Hans > > > #! /usr/bin/bash > > # directory to save your files > SAVE="/tmp/backup" > > # your vi file > VI="/home/me/my.vi.file" > > mkdir $SAVE > if [ $? = 0 ]; then > echo The directory $SAVE has been created. > fi > > for i in $(cat $VI); do > cp $i $SAVE > done > > ********** END *********** > > don't forget to "chmod +x thescript" > > bye > cam > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012041400.PAA20990>