[Wolves] Tar without directory structure
Wayne Morris
wayne at machx.co.uk
Fri Mar 4 13:19:21 GMT 2005
James Turner wrote:
>Use command line option "-C <directory>" (or "--directory <directory>") to
>change to the /home/test/campics directory.
>
>See "man tar" for further information :) :)
>
>Regards,
>
>James
>
>
>
I did actually read up on this before I first mailed, but couldn't make
sense of it and all my attempts failed ;-)
The way I read this directive:
eg pics are in /var/www/html/campics/
archives to go in /var/www/html/campics/archive/
I would include the C switch as:
tar -cf -C /var/www/html/campics/ /archives/test.tar *.jpeg
ie change to root where pics are, save them as test.tar in the sub
directory /archive, grabbing * in the directory you were in.
This doesn't work, seems to hang , and if it did work i would probably
expect the jpegs to still be encased in one folder within the tar.
How should this syntax be written?
Cheers
More information about the Wolves
mailing list