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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 12-23-2004
bhargav's Avatar
bhargav bhargav is offline
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]
Reply With Quote