Hi,
We have a testcases directory structure. It consists of lots of directories
and files.
Since lots of people work on those files, everybody right now copies all the
files and directories to own home dir and then works with that,.
The files in the dir structure are never created but the softwares run
generate some files etc., with are unique to the owner.
So what we want is somehow create the directory structure in the users home
dir. This will be without any files and only soft links to original files
will be there. So the person can run his testcases and they will work like
normal testcases as links to files are there. This way all users wont need
to use so much disk space.

For example the original directory strucure is something like
parent
|
dir1                  dir2               dir3    file1 file2 file3
|                         |
dir11 dir12     dir21 dir 22 file21
|
and so on.
One way of doing this was
1. Use find comand in a script with the option -d. and create directories in
the users home
2. Use find command in script with -f option and then create soft links.
this seems like a kludgy way, and would require some advanced scripting. Any
other way you people can suggest.

One thing to note here that the directory structure should be replicated as
it is at the source because the programs look for paths relative to a
BASEDIR which each user can set according to his/her wishes.
Having such an arrangement will make things good as we will not waste disk
space.

About the job of creating directories, its not very complicated.
I just have to
1. cd to the parent dir
2. Use find command and get all dirs in a file
3. append makedir -p and to starting, cd to the target place and create dirs

the file part is a little tougher because now have to work with ln.
So Any other way you guys can suggest? Maybe linux has an utility which can
do this in one go, that would be great!

thanks
Tanveer
_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to