Monday, July 6, 2009

How to copy directories structure

cd olddir
find . -type d > /tmp/dirlist
cd newdir
for i in `cat /tmp/dirlist` ; do mkdir -p $i ; done

very simply :)

2 comments: