opensubscriber
   Find in this group all groups
 
Unknown more information…

h : help-tar@gnu.org 13 May 2009 • 6:11PM -0400

Re: [Help-tar] Correct use of --directory
by Sergey Poznyakoff

REPLY TO AUTHOR
 
REPLY TO GROUP




Nick Lewis <Nick.Lewis@atlt...> ha escrit:

> [root@asterisk1 factory]# ls
> configurations  factorydefault.tar.gz
> [root@asterisk1 factory]# ls configurations
> etc  tmp  usr  var
> [root@asterisk1 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


Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.