[SLL] simple tar question, why doesn't it work?
greg smythe
onlyme at halcyon.com
Sat Dec 16 23:00:42 EST 2000
Thanks, that worked great!
Greg
On Sat, 16 Dec 2000 taliesin at speakeasy.org wrote:
> greg smythe writes:
>
> >Hello --
> >
> >Trying to exclude a directory from my tar backup, this is what I get:
> >
> >
> >[root at linux cron.daily]# tar -cf --exclude /home/greg /scratch/backup/backup
> >.tar /etc /home
> >tar: Removing leading `/' from absolute path names in the archive
> >tar: /etc/cron.daily/--exclude is the archive; not dumped
> >
>
> You've got an ordering problem; any argument group with "f" in it is going
> to take the NEXT token on the command line as the file to use as the
> archive. Separate things out like this:
>
> tar -c --exclude /home/greg -f /scratch/backup/backup.tar /etc /home
>
> That will get you "tar everything in /etc/ and /home/ except /home/greg
> into /scratch/backup/backup.tar" instead of "tar /scratch/backup/backup.tar,
> /etc/, and /home/ into the file "--exclude" in the current directory"...
> which is what poor getopt() thought you were trying to say. The darn thing
> ain't that smart. :(
>
> -- Glenn
> "It really was the SISO rule, until the nice nellies came along and said you
> can't do that, it's got to be Garbage In, Garbage Out..." -- gus Baird (RIP)
>
>
========================================================================
Contributions/Posts To: linux-list at ssc.com
To Unsubscribe: linux-list-request at ssc.com, "unsubscribe" in message body
Report Problems to: owner-linux-list at ssc.com
List archive at: http://www.ssc.com/mailing-lists/
More information about the linux-list
mailing list