homepage Welcome to WebmasterWorld Guest from 54.163.91.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Copy a directory structure with no files
In linux / unix
shri




msg:911511
 9:53 am on Dec 10, 2004 (gmt 0)

Hi, Can someone point me in the right direction on how I can copy over about 2000 directories to a new disk, without copying files.

I'm sure it involves find, xargs and cp, just cant figure out the right way to do this.

 

Elmo




msg:911512
 4:22 pm on Dec 10, 2004 (gmt 0)

Try unixjunkie.net qestion 5 on unix info page, might help.

Oh and check your stickymail.

aslowrx




msg:911513
 2:26 am on Jan 13, 2005 (gmt 0)

find ./ -type d ¦while read l; do mkdir /directory/$l; done

inefficient, throws errors, should work.

jollymcfats




msg:911514
 5:24 am on Jan 13, 2005 (gmt 0)

or
mkdir /where/you/wantem
cd /source/dir
find * -type d -exec mkdir /where/you/wantem/\{\} \;
Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved