Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Dec 2003 14:02:01 -0600
From:      "Kevin D. Kinsey, DaleCo, S.P." <kdk@daleco.biz>
To:        Chris <racerx@makeworld.com>
Cc:        FreeBSD-questions <questions@freebsd.org>
Subject:   Re: tar question...
Message-ID:  <3FF32B39.2070906@daleco.biz>
In-Reply-To: <200312311329.49998.racerx@makeworld.com>
References:  <000f01c3cfd3$5aa7a090$0901a8c0@bloodlust> <200312311329.49998.racerx@makeworld.com>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Chris wrote:

>On Wednesday 31 December 2003 1:21 pm, Xpression wrote:
>  
>
>>Hi list, I've googled to search an aswer but no one match
>>mine. I want to tar all files on a directory without include
>>any other directory, I've tried with --exclude but no hope,
>>any suggestion ??? Thanks...
>>
>>    
>>
>
>I dom something similar to what you ask. What I do is tar a directory and all 
>it's contense EXCEPT one diectory. It goes something like this:
>
>tar -zcf  name.tgz --exclude MP3 dirname/
>
>Explanation:
>
>I'm tarring a dir. and excluding the dir MP3 and it's files.
>I'm sure you will be able to expand on this.
>
>Use  man tar to see all the switches.
>  
>

Sounds find, but wouldn't

$tar /home/foo/*

get this job done without including
subdirs, since there's no -R involved?

I read the OP's question as "I want to
tar all the files in a directory without
including any other directories..." which
would mean "any (sub)directories within
the directory would not be placed in the
tarball", right?


Kevin Kinsey
DaleCo, S.P.



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?3FF32B39.2070906>