creating a link to a deeply nested folder like ~ = /home/username/
I have an external hard drive mounted at /media/exthdd/
On that hard drive I have folders: Music, Pictures, Videos, etc. Can I make symbolic links to /media/exthdd/Music/ to say the root directory /_ ? the directory /_ is empty I just want a quick method of typing to get me there much like [cd ~] gets me to my home/username folder. I have my music organized by Artist/Year-Album/Track.Title.mp3 I want to be able to "cd /_" then "ls" and see all Artist folders. This is probably very simple I am just not finding it. |
I'm not sure what you mean by '/_'? You have or want a directory literally named 'underscore'? What I would do is 'ln -s /media/exthdd/Music/ ~/extmusic' or some such. Then 'ls ~/extmusic' should show you the 'Artist' directory.
|
I may be looking at the situation backwards but I did a mkdir /_ (just an underscore folder at the root directory)
Are you saying it would be better to link the /media/exthdd/Music/ to something else? I'm a little confused and turned around. |
Quote:
The easiest to explain would be a desktop shortcut -- it's just a plain-text file with certain content: Code:
[Desktop Entry] |
Quote:
Quote:
If you really want the music to be in /_ then rmdir the underscore directory and ln -s the audio dir to /_. If you want it under the underscore directory, then don't rmdir and do ln -s to the underscore directory. But because of crypticness and permissions and so on, I just don't think it's an optimal idea. But it's your system! :) |
Ok I tried slakmagik's orginial idea, it is close to what i want...
the ln -s ... post got me a folder in my home directory like this -- ~/_/Music/Artist/... one more nested folder than i am looking for. Maybe a little tweak to the command line? lutusp gave me errors as I am running Xubuntu and don't have nautilus installed will it work with Thunar? btw, root / or home ~ isn't really important as is the number of keystrokes from the command line :) Getting closer, thanks! |
This discussion is fairly similar to an earlier discussion where the OP wished to make a "bookmark" to a certain location, so he/she didn't need to type a big long path with the `cd` command.
Maybe a bash alias is the answer here too? Though if you want a 'clickable solution' then it may not be the best idea in this case. Check it out, just in case it suits you? Sasha |
Well thanks for the tip GrapefruiTgirl, an alias command may confuse other users in the house. But after giving it some thought I may actually need to use the root directory instead of my home user directory, so that the wife and son's user accounts have access to the Music also.
|
lutusp's general idea is the right one. Get it right once, then copy to wife & son's home dirs.
The Ubuntu forums here or at Ubuntu will explain how to use Thunar. It's probably the same, just try it. Its not generally recommended to be in the root dir for anything, especially if you are not the sysadmin. |
Quote:
If you want the wife and son to have access, they should also have home directories with unprivileged accounts and can have links made in their home directories. The problem with lutusp's method is that it only works from that link on that desktop. A filesystem symlink will work in every desktop, every file manager, and from the command line. But if this is a "permanently mounted" removable drive, so to speak, then it should readable by them wherever it is. If the objective is simply to have a handy way to get it then, as GrapefruiTgirl suggests, there are multiple ways to achieve that. Unfortunately, many of those methods have the inverse problem of only working from the shell. |
All times are GMT -5. The time now is 06:33 AM. |