creating a link to a deeply nested folder like ~ = /home/username/
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 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 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.
It would be much simpler for you to create a desktop shortcut that launches your file browser initialized to the desired directory -- or create a shortcut within your file browser that allows you to go there with a click.
The easiest to explain would be a desktop shortcut -- it's just a plain-text file with certain content:
It would be much simpler for you to create a desktop shortcut that launches your file browser initialized to the desired directory
This assumes he has desktop shortcuts.
Quote:
Originally Posted by AlphaLexman
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.
Okay, you can have a /_ but I don't think it's necessary or desirable. Yes, I'm saying you would probably most like to have the directory of audio files show up as though it were a directory in your home folder with all your other files.
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!
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.
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.
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?
Why do you want an underscore? I feel like we're not communicating something here. If it's one too deep, remove the link and do it again. The link is like a copy command - you want "this" file linked "there". You don't need a special directory to contain the link. If you want ~/Music/Artist and the source has the structure /path/Music/Artist, then 'ln -s /path/Music ~/Music'. If you want ~/_/Artist (for whatever reason), then 'ln -s /path/Music ~/_'.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.