[plug] Copying a directory tree without the files

Matt Kemner zombie at wasp.net.au
Wed Jan 9 23:45:56 WST 2002


Hi Adam

Try either of the below scripts:

>either a) remove all files from the tree but leave the tree
> intact

for X in `find /dir_to_be_wiped_clean/ -not -type d`
do
  rm -f $X
done


> b) copy the tree (minus the files) to a template location.

for X in `find /source_dir -type d`
do
  mkdir /target_dir/$X
done

 - Matt



More information about the plug mailing list