[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-tar] Correct use of --directory
From: |
Sergey Poznyakoff |
Subject: |
Re: [Help-tar] Correct use of --directory |
Date: |
Wed, 13 May 2009 13:11:24 +0300 |
Nick Lewis <address@hidden> ha escrit:
> address@hidden factory]# ls
> configurations factorydefault.tar.gz
> address@hidden factory]# ls configurations
> etc tmp usr var
> address@hidden factory]# tar -cz
> --file=/tmp/ampbackups.factorydefault/configurations.tar.gz
> --directory=configurations *
Before executing this command, the shell first expands the asterisk and
gets:
tar -cz \
--file=/tmp/ampbackups.factorydefault/configurations.tar.gz \
--directory=configurations configurations factorydefault.tar.gz
Then it launches tar. Now, tar changes to the directory `configurations'
and begins archiving files from its command line, i.e. `configurations' and
`factorydefault.tar.gz'. Of course it does not find them and issues the
diagnostics you get.
Regards,
Sergey