From owner-freebsd-questions Mon Dec 4 6: 1: 7 2000 From owner-freebsd-questions@FreeBSD.ORG Mon Dec 4 06:01:04 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from fep04-svc.swip.net (fep04.swip.net [130.244.199.132]) by hub.freebsd.org (Postfix) with ESMTP id A88F237B400 for ; Mon, 4 Dec 2000 06:01:00 -0800 (PST) Received: from epsilon.swip.net ([130.244.199.71]) by fep04-svc.swip.net (InterMail vM.5.01.01.01 201-252-104) with ESMTP id <20001204140045.DVMY17308.fep04-svc.swip.net@epsilon.swip.net>; Mon, 4 Dec 2000 15:00:45 +0100 Received: (from nobody@localhost) by epsilon.swip.net (8.9.3+Sun/8.9.1) id PAA20990; Mon, 4 Dec 2000 15:00:41 +0100 (MET) Date: Mon, 4 Dec 2000 15:00:41 +0100 (MET) Message-Id: <200012041400.PAA20990@epsilon.swip.net> X-Authentication-Warning: epsilon.swip.net: nobody set sender to hj72@everyday.com using -f From: "Hans Johannsson" Cc: freebsd-questions@FreeBSD.ORG To: cam@bsdfr.org Subject: SV: CRON ?! Executable file ?! MIME-Version: 1.0 X-EdMessageId: 09026457554611505712554f4b434c524f4a15515f5d10541f5d5558591c104a56102 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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" 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