help-tar
[Top][All Lists]
Advanced

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

RE: [Help-tar] Correct use of --directory


From: Nick Lewis
Subject: RE: [Help-tar] Correct use of --directory
Date: Wed, 13 May 2009 11:30:00 +0100

Sergey

Thanks for the explanation. I had incorrectly assumed that the wildcard
was passed to tar and was expanded there. 

Is there any way to use the --directory parameter with the wildcard?
Alternatively is there an option to include only the content of the
directory rather than the directory itself i.e. something like:

tar -cz --file=/tmp/ampbackups.factorydefault/configurations.tar.gz
--tar-bomb configurations

Best Regards
Nick 

-----Original Message-----
From: Sergey Poznyakoff [mailto:address@hidden 
Sent: 13 May 2009 11:11
To: Nick Lewis
Cc: address@hidden
Subject: Re: [Help-tar] Correct use of --directory

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

______________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
______________________________________________________________________

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered 
through the MessageLabs Virus Control Centre.
_____________________________________________________________________
Disclaimer of Liability
ATL Telecom Ltd shall not be held liable for any improper or incorrect use of 
the  information described and/or contained herein and assumes no 
responsibility for anyones use  of the information. In no event shall ATL 
Telecom Ltd be liable for any direct, indirect,  incidental, special, 
exemplary, or consequential damages (including, but not limited to,  
procurement or substitute goods or services; loss of use, data, or profits; or 
business  interruption) however caused and on any theory of liability, whether 
in contract, strict  liability, or tort (including negligence or otherwise) 
arising in any way out of the use of  this system, even if advised of the 
possibility of such damage.

Registered Office: ATL Telecom Ltd, Fountain Lane, St. Mellons Cardiff, CF3 0FB
Registered in Wales Number 4335781

All goods and services supplied by ATL Telecom Ltd are supplied subject to ATL 
Telecom Ltd standard terms and conditions, available upon request.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]