Malayamarutham is a mellifluous raaga in carnatic music which will make one soft at heart. In telugu, malaya maarutham is a cool evening breeze which invigorates mind, body & heart.

Feedback, suggestions, criticisms, typos, mistakes, errors etc., (no matter how small you think they are) on the articles of this blog are very welcome. They can be directed to kamaraju at gmail dot com.

Search This Blog

Monday, November 21, 2005

replicate just the directory structure

Let's say you wanted to just copy the directory structure of /opt directory to an usb drive say (/media/usb3/opt) without copying any files between these two directories. Inorder to do this

mount the usbdrive, cd into the destination directory which in this case is /media/usb3

sudo rsync -avzp --delete-after --include "*/" --exclude "*" /opt .

As usual, do not try this without knowing what it does. Use it at your own risk.

Comments/suggestions/feedback etc., are most welcome and you can reach me at (kamaraju at gmail dot com).