I've got a directory structure as follows:
/mnt/ftp/pub/extra/ricky/documentation
this base directory contains more than 25 sub-directories under it which again contain, say around 5-7 sub-directories under each and so on.. I've got a main file HEADER.html at my base directory (i.e. /mnt/ftp/pub/extra/ricky/documentation) which I want to be symbolically linked to all the directories and sub-directories under my base directory. Note: The directories and sub-directories under my base directory contains mostly .html files of Soft Books.
I've been trying with the following command but haven't succeded yet. :-(
# Script for foo in */* do if [ -d $foo ] then cd $foo; ln -s /mnt/ftp/pub/extra/ricky/documentation/HEADER.html HEADER.html; fi done # Script
Am I doing the right way ?
Nope. Once you do the cd, you lose track of where you are.
How about this?Run this when you are located in the top level dir (e.g. /mnt/ftp/pub/extra/ricky/documentation). The line maybe wrapped because of email.
find . -type d -mindepth 1 -exec ln -s `pwd`/HEADER.html {}/ \;
- Sandip
-- Sandip Bhattacharya http://www.sandipb.net sandip at puroga.com Puroga Technologies Pvt. Ltd. http://www.puroga.com
_______________________________________________ ilugd mailing list [EMAIL PROTECTED] http://frodo.hserus.net/mailman/listinfo/ilugd