The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 12-23-2004
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2004
Location: USA
Posts: 511
small modification to remove the tmp dir
cd ..


[CODE]

#!/usr/bin/ksh
mkdir tmp
for i in `find . -type d -print`
do
mkdir -p tmp/$i
done

cd tmp ; rm -rf tmp

tar cvf dirs.tar .
mv dirs.tar ../
cd ..
rm -rf tmp


[/QUOTE]