-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 09 Feb 2004 04:29:34 +0530
Sandip Bhattacharya <[EMAIL PROTECTED]> wrote:

> Ritesh Raj Sarraf wrote:
> 
> > 
> > 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 {}/ \;
> 
> 
Thanks a lot. You made me save a huge amount of time.

rrs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAJtJ94Rhi6gTxMLwRAmO8AJoC/lzxm1pmsS0t2+iTN8LDVRcRfQCfZjLU
P7r5hBXNkmu7C5LQ5/8rLwo=
=yFnm
-----END PGP SIGNATURE-----

_______________________________________________
ilugd mailing list
[EMAIL PROTECTED]
http://frodo.hserus.net/mailman/listinfo/ilugd

Reply via email to