[Gllug] cp real files but not links

David Damerell damerell at chiark.greenend.org.uk
Wed Feb 25 15:22:03 UTC 2009


On Wednesday, 25 Feb 2009, David L Neil Mailing list a/c wrote:
>Is it possible to copy a directory's contents (and sub-directories) to a
>new location, but only the 'real files' and not any symlinks?

You could do a "find -type l" after the copy. Remember to do something
like "find -print0 ... |xargs -0" to avoid tripping up on baroque
filenames.

-- 
David Damerell <damerell at chiark.greenend.org.uk> flcl?
Today is Chedday, February.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list