[X-Unix] zip from command-line in Tiger

David Ledger dledger at ivdcs.demon.co.uk
Wed Jun 29 12:43:09 PDT 2005


>
>Date: Sun, 26 Jun 2005 22:37:29 -0400
>From: Stephen Jonke <sjj_public at mac.com>
>Subject: Re: [X-Unix] zip from command-line in Tiger
>To: "A place to discuss Mac OS X from the perspective of the command
>	line."	<x-unix at listserver.themacintoshguy.com>
>Message-ID: <BD07B3D1-323B-4B89-AF17-B30ED616EA67 at mac.com>
>Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>I'm looking at tar now and the only problem is its insistence upon
>putting the directory structure in. I found the -C option, but short
>of manually building the tar archive file by file, is there any way
>to tell it to create an archive with all the listed files, without
>placing them in a copy of the directory hierarchy? I.e. so that when
>uncompressed you end up with a folder that contains all the files
>directly in it, regardless of their original locations? None of the
>options looks like it does this, but I want to be sure I'm not
>missing something obvious. The only way I can think to do this, then,
>would be a separate tar command for each file, using -c for the first
>one and -r for subsequent ones, each time using -C to go to the
>directory of the file before adding it. Is there a better way?
>
>Steve

It's designed not to work that way because it's so rarely what is 
wanted. In over 20 years of tar use I've never wished it did that.

If you had identically named files in different directories, what would it do?

David


-- 
David Ledger - Freelance Unix Sysadmin in the UK.
Chair of HPUX SysAdmin SIG of hpUG technical user group (www.hpug.org.uk)
david.ledger at ivdcs.co.uk
www.ivdcs.co.uk


More information about the X-Unix mailing list