Analogy to Windows shortcut that's NOT a symlink?
In Linux (more precisely in Xfce's Thunar), is there a way to create a link that does not create a new representation of already existing data but that simply makes me jump to the target?
An example: "$ ln -s /media/data/xyz ~/Desktop/xyz" creates a symbolic link to /media/data/xyz on my Desktop. Very fine. I can "$ cd ~/Desktop/etc/", or I can navigate to ~/Desktop/etc/, and maybe there is a big folder structure hidden in this xyz folder (~/Desktop/etc/gi/ga/gu/...). But I'd like cd (or at least Thunar) to jump to /media/data/xyz! Is there any way to achieve this? It's what a Windows shortcut does, and it could be useful in some situations. [edit: as Grail pointed out, Windows only works like this in the gui. The Windows terminal can't handle .lnk files like this. See 3rd post.] Oh, I'm /sure/ this question has been answered before, but I've spent quite a while searching... |
I am confused by the following statement:
Quote:
Also, when making a claim, such as: Quote:
On traversing to the Desktop folder and issuing a cd command to the same lnk file created I receive: Code:
c:\>cd "Documents and Settings\grail\Desktop" |
Oh, I was not aware of the fact that the Windows terminal can't handle .lnk files. I was only thinking of the gui. Thank you, Grail, for this piece of information. So I fully take back the statement that I'd like to see original Windows (TM) behaviour. As usual, I'd like something _better_ than Windows ;-)
I'll give an example of what I'd /like/ to see: Code:
~/Desktop$ ln -s /media/data/xyz Code:
~/Desktop$ ln -s /media/data/xyz Why do I ask this question? I've created a similar symlink on my girlfriend's computer for her documents folder. Now I'd prefer her not to get confused with data existing in two separate places. However, sometimes she is bound to go to the original place as Thunar and encfs produce an error under the symlink in some circumstances. I hope my question is clearer now. |
Ok ... so i played around a little (as this is not a feature I understand wanting) and found the following:
Code:
-P If set, the shell does not follow symbolic links when executing commands such as cd that change the current working directory. It uses the physical directory structure instead. By default, bash follows the you will probably need to either find out how it currently performs the task and change it or go to their forums to see if it is possible without recoding / recompiling the code. Hope that helps a little. btw. I would point out it may just be easier to explain to your girlfriend that the data is in only one place but there are multiple ways to get there. My mother was in her 60s when I switched her to Linux and she managed :) |
Cool! That's an answer for the shell, thank you. Now I'll just have to find out if Xfce's Thunar can do the same thing. About educating women... you know how good it feels to offer smooth solutions that do not require too much learning ;-)
I found out something interesting: You can do Quote:
If you want the change to be permanent, add Quote:
Source: http://linux.about.com/library/cmd/blcmdl1_cd.htm |
All times are GMT -5. The time now is 09:38 AM. |