Date: Mon, 4 Dec 2000 15:57:10 +0100 From: cam <cam@bsdfr.org> To: "Hans Johannsson" <hj72@everyday.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: CRON ?! Executable file ?! Message-ID: <200012041352.OAA76965@mailhost.esil.univ-mrs.fr> In-Reply-To: <200012041318.OAA19167@epsilon.swip.net> References: <200012041318.OAA19167@epsilon.swip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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?200012041352.OAA76965>