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

[ale] tar question



Hi -


On Fri, 21 Jul 2000, David S. Jackson wrote:

> I'm experimenting with tar, which I should know much better than
> I do.  :-)
  Hey, it's only risky if you want to unpack the archives some day.

> What's the best way to include ".filenames" without including
> "..", which will include the everything in the parent directory?


If it's a directory with any complexity, I run from an explicit list:

$ find <root_of_top> -print > <tempdir>/tarfile.list

If you are only selecting whole directories for inclusion or exclusion,
you can do:

$ find <root_of_top> -type d -print > <tempdir>/tarfile.list

Now edit 'tarfile.list' to delete all directories you wish omitted. If you
are naming files explicitly, delete _all_ lines which name just
directories, else you'll get those entire subtrees. 'tar' will create
subdirectories for itself where you've specified files of interest
within them.

When you're ready to make your archive, do:

$ cd <root_of_top>
$ tar c[v]f <tempdir>/<tarfilename> -T <tempdir>/tarfile.list

You can roll lots of variations on this, naturally.

 - Br'er Rabbit

   John Mills
   Sr. Software Engineer
   TGA Technologies, Inc.
   100 Pinnacle Way, Suite 140
   Norcross, GA 30071-3633
   e-mail: jmills at tga.com
   Phone: 770-441-2100 ext.124 (voice)
          770-449-7740 (FAX)

--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.