[SOLVED] Windows 7 style "Libraries" - anything like it planned for Linux?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm guessing that symlinks require command line to set up, you can't just go to a file browser GUI and click your want into symlink nirvana (at least I don't know anyway to do that - but admittedly, I seldom use a file browser and prefer command line).
Its actually very easy to do in Dolphin ( KDE File Manager )
You can have a 'two pane' view ( via split button or F3 )
navigate to source in one pane, and destination in the other ( or start your split in Src./Dest. )
Drag a file/folder to the other pane and.. it pops up a move..copy..link.. selector.
I imagine it is much the same in other file managers, ( but none have the embedded konsole I like so much )
I'm growing increasingly bored of users like you turning up on forums like this one and demanding a certain kind of answer from only certain users and accepting only those answers which meet with your preconceived ideas about GNU/Linux and computing in general - while whining about not having time to learn due to having a "real life", etc. If you don't have the time to learn because your time is so valuable, then GNU/Linux is not for you - use the OS which already has this great must have feature and stop wasting everyone's time...
I'm amazed you got as many useful responses as you did - considering your arrogant, demanding attitude and general aura of self importance and entitlement.
Symbolic links would EASILY handle all of this for you, and from what I understand it would function exactly like your current setup does. You said in your OP that symlinks don't do what you need, but what you described here is exactly what they do. Maybe you just don't understand what symlinks are or how they work? Or maybe you could describe better what this Library setup does that symlinks can't, since you specifically said in your OP that they "simply don't cut it".
Let's say you have DirA with FileA1 and FileA2 in it, and DirB with FileB1, FileB2 and FileB3 inside. Then library LibX "merges" DirA and DirB so it look like just one Dir:
Quote:
LibX:
FileA1
FileA2
FileB1
FileB2
FileB3
instead of
Quote:
LibX:
SymlinkA:
FileA1
FileA2
SymlinkB:
FileB1
FileB2
FileB3
Last edited by Captain Pinkeye; 08-16-2013 at 05:25 PM.
It will look like the first way if you create symlinks to the files. It will look like the second way if you create symlinks to the directories instead. Your choice.
Symbolic links would EASILY handle all of this for you, and from what I understand it would function exactly like your current setup does. You said in your OP that symlinks don't do what you need, but what you described here is exactly what they do. Maybe you just don't understand what symlinks are or how they work? Or maybe you could describe better what this Library setup does that symlinks can't, since you specifically said in your OP that they "simply don't cut it".
I think the issue there was that symlinks wouldn't work across a network. That is why I mentioned a distributed or union file system earlier. Although I think that too would be way too involved for the Op's professed willingness to invest in this, as would else anything not ready out of the box. Also it would be far more than what he needs for something so simple.
Why make it so complicated when you can just organize your system and use NAS?
It will look like the first way if you create symlinks to the files.
That is true, but you would have to create symlink for each directory, AFAIK; creating any sort of symlink (or library) for the directory containing those directories is probably easier.
That is true, but you would have to create symlink for each directory, AFAIK; creating any sort of symlink (or library) for the directory containing those directories is probably easier.
That doesn't seem to make much difference. You could do
Code:
for i in Dir[AB]/*
do
ln -s $i LibX/$(basename $i)
done
That doesn't seem to make much difference. You could do
Code:
for i in Dir[AB]/*
do
ln -s $i LibX/$(basename $i)
done
or something similar, depending on needs.
Agreed, it's trivially easy. I still fail to see any instance in which this Windows "Volume" function has any advantage over traditional Linux symlinks.
More and more it seems like the OP's original requirement of not using symlinks is more an indication of the OP's lack of understanding of symlinks rather than an indication of the lack of functionality of Linux symlinks.
Agreed, it's trivially easy. I still fail to see any instance in which this Windows "Volume" function has any advantage over traditional Linux symlinks.
More and more it seems like the OP's original requirement of not using symlinks is more an indication of the OP's lack of understanding of symlinks rather than an indication of the lack of functionality of Linux symlinks.
You won't hear any argument from me. The network element gave me pause for a minute, but you're right, you could do it with NFS quite simply.
You would have to add a minor check to append a number or something if there are duplicate filenames, but otherwise I can't think of any issues. You could even go a step further and say
Code:
for i in Dir[AB]/{*.jpg,*.bmp,*.gif}; do ln -s $i Pictures/$(basename $i); done
and
Code:
for i in Dir[AB]/{*.doc,*.txt,*.rtf}; do ln -s $i Documents/$(basename $i); done
or whatever other extension you wanted so that picture, video, and document files got routed to the appropriate Pictures, Documents, and Videos folders in the user's home directory. That way, you really could, what was it Haertig said before . . . throw your files all over creation? . . . and they would just get magically organized. Couldn't be simpler.
The only minor thing is that something like this would obviously have to be run after changes to the target directories so that any new files got added to the "libraries." And of course before the ln command was run again, the old links would need to be removed in case any of the target files had gotten deleted. But I'm pretty sure there are file browsers that can be configured to run a script when you access a predefined folder, aren't there?
So yes, I believe you're right, symlinks are all you really need. That's all the Windows libraries are anyway. I guess we should congratulate Windows for finally implementing them. Too bad they couldn't come up with a more sensible use.
That doesn't seem to make much difference. You could do
Code:
for i in Dir[AB]/*
do
ln -s $i LibX/$(basename $i)
done
or something similar, depending on needs.
Quote:
Originally Posted by BloomingNutria
Code:
for i in Dir[AB]/{*.jpg,*.bmp,*.gif}; do ln -s $i Pictures/$(basename $i); done
and
Code:
for i in Dir[AB]/{*.doc,*.txt,*.rtf}; do ln -s $i Documents/$(basename $i); done
The only minor thing is that something like this would obviously have to be run after changes to the target directories so that any new files got added to the "libraries." And of course before the ln command was run again, the old links would need to be removed in case any of the target files had gotten deleted. But I'm pretty sure there are file browsers that can be configured to run a script when you access a predefined folder, aren't there?
into fstab and never ever had to change anything or run-after-changes anything anywhere, because it would just work.
But if you think if your solution is simpler, i won't argue with you.
That solution is dependent on having the mhddfs package available (it's absent in many distros), and also on relying on it for continued usage. Symlinking has no such limitations; it's a basic Unix concept. So yes, I think it's simpler, and less prone to influence of external forces.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.