LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-24-2009, 07:53 PM   #1
rismoney
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
symbolic link script


I have a folder structure that looks like this

/share/name01/thumbs
/share/name01/pics
/share/name01/orig
/share/name02/thumbs
/share/name02/pics
/share/name02/orig
.
.
.

What I would like is to have a little sh script I can run in my master folder that loops through all the folders in the specified tree and creates symbolic links (ln) to just the /orig subdir and names the links:
/master/name01/orig
/master/name02/orig
.
.
.

Can anyone assist?
 
Old 02-25-2009, 12:07 AM   #2
chakka.lokesh
Member
 
Registered: Mar 2008
Distribution: Ubuntu
Posts: 270

Rep: Reputation: 33
Quote:
for i in `find /complete/path/from/root -type d`; do mkdir -p .$i; done
for i in `find /complete/path/from/root -type f`; do ln -s $i .$i; done
does this helps you????

Last edited by chakka.lokesh; 02-25-2009 at 12:09 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbolic link not allowed or link target not accessible paullaubscher Linux - Newbie 4 03-10-2010 06:47 AM
How to create symbolic link to html file and avoid page link problem? haxpor Linux - General 2 01-29-2008 07:40 AM
symbolic link to the realplay script is in your PATH Baracuda Linux - Software 1 10-03-2005 02:31 AM
Symbolic link? jasone Linux - Newbie 4 05-06-2005 07:55 AM
need help with symbolic link to shell script scottsteibel Linux - Software 8 08-02-2003 11:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration