Pipe Output of ls -lR into a tar archive

Charles Curley charlescurley at charlescurley.com
Fri Jun 18 19:59:26 UTC 2004


On Fri, Jun 18, 2004 at 11:04:36AM -0700, Ow Mun Heng wrote:
> I need help,
> 
> 	EIther google isn't finding the stuffs or my search terms are too
> muddled.
> 
> I just want to create a tar archive from a directory file listing.
> 
> something like
> 
> ls -laR ~/the/dir/to/list | tar -cvf - /tmp/tarred-dir-list.tar.gz
> 
> I can't seem to find the correct syntax

If all you want is a compressed text file with a recursive descent
listing of a given directory, why bother with tar? Try this:

ls -lR dir | gzip > lslR.gz

-- 

Charles Curley                  /"\    ASCII Ribbon Campaign
Looking for fine software       \ /    Respect for open standards
and/or writing?                  X     No HTML/RTF in email
http://www.charlescurley.com    / \    No M$ Word docs in email

Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040618/ed2e4945/attachment-0001.sig>


More information about the fedora-list mailing list