Re: [OT] Recursive dir (linux)

new topic     » goto parent     » topic index » view thread      » older message » newer message

ags wrote:
> 
> ChrisBurch2 wrote:
> > 
> > ChrisBurch2 wrote:
> > > 
> > > Pete Lomax wrote:
> > > > 
> > > > On Sun, 15 Oct 2006 07:47:11 -0700, ChrisBurch2
> > > > <guest at RapidEuphoria.com> wrote:
> > > > 
> > > > >Anyone know of a quick way to recursively copy a directory tree under
> > > > >linux
> > > > >with filemasking.
> > > > >
> > > > >cp -R ~/euphoria/*.e* ~/tmpdir
> > > > >
> > > > >does not work, and only copies the top level.
> > > > what does cp -a give you?
> > > > 
> > > > Pete
> > > > 
> > > > 
> > > Hi
> > > 
> > > Just the top level. But heres how to do it - find was the key.
> > > 
> > > find ~/euphoria -iname "*.e" -o -iname "*.ex" -o -iname "*.exu"  -exec cp
> > > --parents
> > > '{}' ~/eutemp \;
> > 
> > groan - that should have worked, just found its only copying the *.exu s. Oh
> > separate lines in a script it is then.
> 
> Hi Chris
> 
> I don't have a tailor-made solution for you, but another way to do this is
> with
> tar, eg:
> 
> tar cvf - ~/euphoria/*.e* | tar xf - -C ~/tempdir
> 
> (Will make a folder 'euphoria' under tempdir)

Hi

Again, strangley, that only did the top level. I think the reasoning goes
something like, I have no directories that match *.e*.

Th find technique works fine, since even if duplicate files are picked from
one line to another, I wanted these anyway.

Chris


> 
> This is how they recommend you do this over separate filesystems too.
> 
> Gary

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu