LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 08-16-2013, 01:13 PM   #61
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444

Quote:
Originally Posted by haertig View Post
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 )
 
Old 08-16-2013, 02:44 PM   #62
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Rep: Reputation: 85
Quote:
Originally Posted by cynwulf View Post
Which is precisely what you should be doing...

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.
+1

Well stated.
 
Old 08-16-2013, 05:21 PM   #63
Captain Pinkeye
Member
 
Registered: Oct 2012
Location: The Czech Republic
Posts: 280

Rep: Reputation: 97
Quote:
Originally Posted by suicidaleggroll View Post
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:
    1. FileA1
    2. FileA2
  • SymlinkB:
    1. FileB1
    2. FileB2
    3. FileB3

Last edited by Captain Pinkeye; 08-16-2013 at 05:25 PM.
 
Old 08-16-2013, 05:41 PM   #64
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,176

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
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.
 
1 members found this post helpful.
Old 08-16-2013, 05:41 PM   #65
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Rep: Reputation: 85
Quote:
Originally Posted by suicidaleggroll View Post
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?
 
Old 08-16-2013, 05:44 PM   #66
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian
Posts: 2,176

Rep: Reputation: 334Reputation: 334Reputation: 334Reputation: 334
Quote:
Originally Posted by BloomingNutria View Post
I think the issue there was that symlinks wouldn't work across a network.
No, but you could use SMBFS or SSHFS to handle the network part of things, then symlinks for further organization on the local machine.
 
Old 08-16-2013, 05:50 PM   #67
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,481

Rep: Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089
Quote:
Originally Posted by haertig View Post
No, but you could use SMBFS or SSHFS to handle the network part of things, then symlinks for further organization on the local machine.
Also the very popular and built-in NFS.

If it can be mounted across the network, it can automounted and symlinked wherever you want it.
 
1 members found this post helpful.
Old 08-16-2013, 05:51 PM   #68
Captain Pinkeye
Member
 
Registered: Oct 2012
Location: The Czech Republic
Posts: 280

Rep: Reputation: 97
Quote:
Originally Posted by haertig View Post
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.
 
Old 08-16-2013, 07:26 PM   #69
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Rep: Reputation: 85
Quote:
Originally Posted by Captain Pinkeye View Post
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
or something similar, depending on needs.
 
1 members found this post helpful.
Old 08-16-2013, 08:57 PM   #70
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,481

Rep: Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089Reputation: 2089
Quote:
Originally Posted by BloomingNutria View Post
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.
 
Old 08-16-2013, 11:36 PM   #71
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Rep: Reputation: 85
Quote:
Originally Posted by suicidaleggroll View Post
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.
 
Old 08-17-2013, 02:08 AM   #72
Captain Pinkeye
Member
 
Registered: Oct 2012
Location: The Czech Republic
Posts: 280

Rep: Reputation: 97
Quote:
Originally Posted by BloomingNutria View Post
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 View Post

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?

No, i would rather put something like
Code:
mhddfs#/something/something/DirA,/something/something/DirA /something/something/LibX fuse defaults 0 0
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. Linux is about choice, isn't it?
 
Old 08-17-2013, 10:05 AM   #73
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 359

Rep: Reputation: 85
Quote:
Originally Posted by Captain Pinkeye View Post
No, i would rather put something like
Code:
mhddfs#/something/something/DirA,/something/something/DirA /something/something/LibX fuse defaults 0 0
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.

Quote:
Linux is about choice, isn't it?
That is highly debatable.

Last edited by Kallaste; 08-17-2013 at 10:07 AM.
 
  


Reply


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
Qt "cannot call constructor for""a function-style cast remove the redundant ::QBrush" Peterius Linux - Software 4 11-24-2010 04:57 PM
LXer: "A few more" versions of Linux Kernel 2.6.20 planned LXer Syndicated Linux News 0 08-15-2007 09:11 AM
LXer: Open Source, the only weapon against "planned obsolescence" LXer Syndicated Linux News 0 03-28-2007 09:16 PM
how do i get to a "Windows style" desktop screen in SuSE 9.1 xxvm1 Linux - Newbie 18 07-23-2004 11:17 PM
"Fast User Switching" (XP Style) in Linux... cedillo Linux - Newbie 3 12-18-2002 12:42 AM


All times are GMT -5. The time now is 12:52 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration