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 -->
  #4 (permalink)  
Old 11-23-2007
findprakash findprakash is offline
Registered User
 

Join Date: Sep 2007
Posts: 30
I used below code as suggested by Porter for compressing and copying directory.

find ${COPY_DIR} -type f | while read N
do
mkdir -p "${BACKUP_DIR}/`dirname $N`"
gzip < $N > ${BACKUP_DIR}/$N.gz
done

However I have some directories which have space in name. I get below error when copying and compressing directories which have sapce in name.

/backup/sidora/iAS/ifs1.1/doc/Quick Tour/Graphics/rtarr.gif.gz: cannot create

Any ideas on how can I take fix above error. Thanks in advance.
Reply With Quote