[sclug] strip paths from file when tarring?
Darren Davison
darren at davisononline.org
Sat Mar 5 23:05:55 UTC 2005
On Sat, 2005-03-05 at 21:47 +0000, John Stumbles wrote:
> like this?
>
> tar cjf mytar.tbz2 foo/ bar/; cd long/path/to/; tar cjf mytar.tbz2 \
> logfile.log
>
> not sure about the flags (cjf) - obviously you want to add the logfile
> to the now-existing archive file (and I can't be bottomed to rtfm,
> especially as I recall it's a $%&**! info file instead of a proper man
> page :-()
I think the append flag is 'A', but you can't append to a compressed
archive, so I guess I have to do..
tar cf mytar.tar foo/ bar/
cd long/path/to
tar Af ~/mytar.tar logfile.log
bzip2 ~/mytar.tar
It just seemed a bit unusually verbose, I assumed I was missing some
simple option to drop path names when adding to an archive.
Cheers!
--
Darren Davison
Public Key: #DD356B0D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.tmdg.co.uk/pipermail/sclug/attachments/20050305/1b23f131/attachment.bin
More information about the Sclug
mailing list