Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.