Re: Backup script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2006-03-13 at 10:08 +0000, Chris Norman wrote:
> Hi,
> I've got that, the only thing, when I run the script first hand, I get:
> 
> : Bad interpreter: No such file or directory
> 
> At the top, I have:
> #!/bin/bash
> 
> I tried:
> #!/bin/sh
> 
> But that got the same results. The permission bits are:
> 
> -rwxr--r-- root root
> 
> I'm running it as root.
> 
> No probs, I have fixed that, just re-wrote it, and it seemed to work. I have 
> another problem now though:
> 
> Tar says it can't "stat" ls, says there's no such file or directory.
> 
> here's the script:
> 
> #!/bin/bash
> 
> cd /var/ftp/backup;
> 
> for file in ls
The way I gave you this was
   for file in `ls`
The ls is surrounded by backticks so it gets executed and the result is
a list that is passed as $file for processing in the loop.


> do {
> tar cf /home/backup/$file.tar.tar $file/
> } done

> 
> What is the problem?
> 
> Cheers,
> 
> Chris Norman
> <!-- chris.norman4@xxxxxxxxxxxx -->
> ----- Original Message ----- 
> From: "Michaël Hooreman" <mhooreman@xxxxxxxxxxxxxx>
> To: "'For users of Fedora Core releases'" <fedora-list@xxxxxxxxxx>
> Sent: Monday, March 13, 2006 9:25 AM
> Subject: RE: Backup script
> 
> 
> fedora-list-bounces@xxxxxxxxxx <> scribbled on lundi 13 mars 2006 10:22:
> 
> > Where would I put the weekly cron job?
> 
> /etc/cron.weekly if anacron runs on your machine
> 
> If not, a cron line 0 0 * * 0 will run it every Sunday at 00:00. See man
> 5 crontab.
> 
> ---
> Michaël Hooreman
> Keyware Transaction and Processing
> Rue Laid Burniad, 4
> 1348 - Louvain-La-Neuve
> Belgium
> Tel : +32 (0)10 48 01 21
> Fax : +32 (0)10 45 77 67
> mhooreman@xxxxxxxxxxxxxx
> 
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
> 
> -- 
> fedora-list mailing list
> fedora-list@xxxxxxxxxx
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list 
> 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux