Simon,
Is it possible to have cp skip some directories when using cp -R?
Dunno, but cpio -p would be able to solve your problem.
$ find . -print | cpio -pdmuv /new/directory
Find simply generates a list of file names, which cpio reads on it's
standard input
as a list to copy. Obviously
Thanks all, seems like rsync is what I have been looking for.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Julio Cesar Ody
Sent: Fri, 27. May 2005 2:21 PM
To: [EMAIL PROTECTED]; slug
Subject: Re: [SLUG] Cp -R skipping some directories
Well
HI all,
Is it possible to have cp skip some directories when using cp -R?
OLMC
Simon Bryan
IT Manager
[EMAIL PROTECTED]
LMB 14
North Parramatta
tel: 96833300
fax: 98901466
mobile: 0414238002
--
SLUG - Sydney Linux User's
On Fri, 27 May 2005 14:08:37 +1000, Simon uttered
HI all,
Is it possible to have cp skip some directories when using cp -R?
You can. Except just cp -R won't cut it. The one way that springs to
mind is using find with -prune and -exec cp {} \; dest
Cheers,
--
Simon wrote:
HI all,
Is it possible to have cp skip some directories when using cp -R?
I don't think so. Looked into it just the other day. I think find is
your friend or start copying from deeper down the tree?
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Well, that depends on what we're talking about. In a script context,
you could have an ignore list, and by checking if folder1 is in
it, the script would that folder and move on.
(insert your favorite shell hack here)
But strictly as a command, you have regexes available. By copying
ma*
From: Simon [EMAIL PROTECTED]
Date: Fri, 27 May 2005 14:08:37 +1000
Is it possible to have cp skip some directories when using cp -R?
mirrordir command can help you.
--
SEKINE Tatsuo
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: