[plug] Ambiguous redirection error
Paul Dean
paul at thecave.cantech.net.au
Sat May 11 09:46:48 WST 2002
Hya Richard,
How are you "looking" for you files to be listed in the script?
The way I've done my backup scripts is by using find.
ie `find "$hdata" $mdata" -type f -print | egrep -v "$notmatch" >"$tmpfdst"`
Where hdata="./home/" and mdata="./var/spool/mail" notmatch="files you
don't want to backup in the vars" then redirecting it to a file in var tmpfdst.
Then use tar -z -c "$dst/$bkp" -T "$tmpfdst"
Tar creates and gzips the file and gets file listing from $tmpfdst.
Hope this helps...
On Sat, 11 May 2002, Richard wrote:
> I am currently trying to write a script(s) that will backup certain personal
> files on a regular basis. My email is one of the things I would like to
> backup and, using kmail, it resides in a single dir, Mail, in mbox format. I
> have been trying to work out a command to append all files in the Mail dir to
> their name sake in a separate backup dir, which would then be re-archived. I
> have been trying to redirect the output of the cat command to the backup
> files and using the * to perform the action on all files in the dir, but I
> keep getting the error message 'ambiguous redirection'. I could explicitly
> name all of my mail files/folders in the script but would like to avoid
> having to update the script every time a new folder is added in kmail. Could
> anyone suggest a command-line string that would have the desired effect? Or a
> better way of regularly archiving my mail (if I'm in danger of re-inventing
> the wheel :) Thanks.
>
> Richard
>
--
Paul...
/***** Experience is that marvelous thing that enables you to
recognize a mistake when you make it again.
-- Franklin P. Jones *****/
/*****All programmers are playwrights and all computers are lousy actors.
-- Unknown*****/
/* How smart are Computers? They seem to need instructions all the time...
-- Me */
More information about the plug
mailing list