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.
Notice I used a relative path (as you did). But you might want an absolute path depending on where the link is and how it is used.
Various mount operations (as Thor_2.0 suggested) might be better alternatives in some situations. But I don't see any hint in your original post that a mount would be better than a symbolic link.
For things you need to type in a lot, using an environment variable, and alias or a script is usually better than a symbolic link or mount:
Code:
export there=/absolutepathto/here
cd $there
That first line should be in some login or bash startup script so you edit it into there once then don't need to type it again.
The word export in that first line may not be necessary, depending on how you use "there".
Thinking things through, perhaps I should tell more.
I have a mounted external HDD. I've already changed all the links to ~/home/Documents (etc) to point to the same folders on the external HDD. I use nemo to get to these folders. The original folders in home are still there and get used sometimes. They're backed up daily to the duplicate folders on the HDD.
The problem I'm facing is that I constantly have to change directories to the external HDD or type in an absolute path to either open something or look at the contents of a folder.
For example, if I want to confirm the naming convention of a folder in my software directory on the external HDD I have to type:
ls /run/media/win7/storage/Software (don't ask me why it's called 'win7' please)
From any prompt location in the CLI, I would simply like to type in:
ls /here/Software to get a directory listing. Similarly, making a directory in Software before wgetting a file and then wgetting the file to that location would be easier if I had some sort of symbolic link too.
Do I have to actually make a folder to represent the location since the location already exists? The external HDD is already auto-mounted on boot.
I am new to this, and trying to move over to the CLI instead of GUI, so please be gentle with your answers and assume I'm a noob who doesn't know how to do anything.
Thanks.
Last edited by wavelength72; 06-20-2015 at 05:08 AM.
Reason: spelling errors
The mount does that...
create a script that mounts the folder, and in the future, you can add more stuff...add this to the crontab as @reboot
It is one option, there are more enlightened ones that may have something better than that...
Thor
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.