LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 09-06-2009, 11:00 AM   #1
English_Man
Member
 
Registered: Feb 2004
Location: Stockholm SWEDEN
Distribution: Kubuntu 9.04
Posts: 54

Rep: Reputation: 15
Auto creation of Symlinks [Kubuntu 9.04]


Hi there.I am currently running Kubuntu 9.04.

I use this machine as a print/file server for my home network. Samba is working fine and both the windows (vista) machine and my Xbox (XBMC) can read/write perfectly.

On the Kubuntu box I have serveral hard drives mounted as;

/drive1
/drive2
/drive3
/drive4
/drive5

Each drive has hundreds of sub directories. Everyday lots of new sub directories are created. With this many sub directories on multiple drives, it makes browsing for a specific sub directory quite difficult.

What I want to do is create a new share that contains symlinks to each sub directory in each drive. So it would appear that all the sub directories from all the drives are listed under one share. This way I can easily navigate around my shares using my network.

All the directories are only 1 sub directory deep, most of the drives look like this;

/drive1/Subdiretory1/file

Is there anyway to create a cron job that every hour it will parse the drives and create a new symlink for each new sub directory?

If it is not possible to use symlinks, is there another alternative I could use?

Thanks in advance

E_Man
 
Old 09-06-2009, 12:21 PM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,546
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Are all the sub-directories uniquely named? In other words is there any chance of having a /drive1/foo and a /drive2/foo?
 
Old 09-06-2009, 04:21 PM   #3
English_Man
Member
 
Registered: Feb 2004
Location: Stockholm SWEDEN
Distribution: Kubuntu 9.04
Posts: 54

Original Poster
Rep: Reputation: 15
There might be a few but 99% of them are unique. I can rename/remove any that are.
 
Old 09-10-2009, 11:16 AM   #4
English_Man
Member
 
Registered: Feb 2004
Location: Stockholm SWEDEN
Distribution: Kubuntu 9.04
Posts: 54

Original Poster
Rep: Reputation: 15
Don't mean to be a pain, but if anyone has any suggestions!
 
Old 09-10-2009, 11:38 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,546
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Sorry for no follow-up, this one somehow slipped through the cracks.

Reading again your "Samba is working fine and both the windows (vista) machine and my Xbox (XBMC) can read/write perfectly", I'm doubtful that symlinks will work because they work within the Linux file system environment but the "namespace" is (please confirm) different when they are mounted via Samba.

In Linux you can easily create a symbolic link on /symlinks_share pointing to /drive1/my_directory but, assuming you mount /symlinks_share on Vista as X: and /drive1 as T:, Vista isn't going to know what to do with X:\my_directory pointing to /drive1/my_directory.

It may be possible to create Windows shortcuts (*.lnk files) on X: that do what you want.

I don't know enough about Samba or Vista to give much more help.

If you don't get an answer you could post again mentioning Samba, Windows and, say, "virtual directory" in the title of the post. That way people who have expertise in those areas may be attracted to read the post.

"Auto creation of Symlinks" in Linux is easy but I don't think it will address your requirement.
 
Old 09-10-2009, 11:58 AM   #6
English_Man
Member
 
Registered: Feb 2004
Location: Stockholm SWEDEN
Distribution: Kubuntu 9.04
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks alot for your reply.

Any yes you are corrent that the namespace changes depending on each machine.

I will have a look at creating the links on the windows side of things instead see it that is possible.

Once again, thanks for your time!

E_Man
 
  


Reply

Tags
cron, help, kubuntu, symlinks


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
System user creation with mysql user creation moos3 Programming 1 08-11-2007 08:01 PM
Kubuntu - unexpected auto reboot supradrvr Linux - General 0 08-06-2007 07:59 PM
auto updateing symlinks? Tortanick Linux - General 2 01-07-2007 07:09 AM
auto partition by installation of kubuntu aydindemirci Ubuntu 4 03-13-2006 03:07 PM
auto creation of user's home space yakkerty Linux - General 0 08-06-2002 10:30 AM


All times are GMT -5. The time now is 09:41 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration