I've never been at ease with the "ln" CLI command. It seems all but inscrutable in its complexities, and foils me every time I try to use it. I'm trying again tonight.
I come from Windows, where creating a link to another file in the very easy, and in fact available from the right-click menu. Very user-friendly. Nothing like this exists in Linus, so far as I can tell. I very much wish it did.
Meanwhile, I still need this functionality. I've dug through all the documentation I can find - the info page output, and the output from info coreutils 'ln invocation', and I still cannot get it right. I've studied a couple of tutorials on relative and absolute pathnames, and found them not useful to me, in that they didn't lead me to a working symlink creation command. I'm baffled as to why this simple operation is so elusive to me. Here's what I'm trying to do:
I have a file here: "/home/tomc/E-books/filex.pdf"
I want a link to it that will survive being moved to another location.
I've tried all these, and none actually work:
ln -s "filex.pdf" "link to filex.pdf"
ln -s "../filex.pdf" "link to filex.pdf"
ln -s "../../filex.pdf" "link to filex.pdf"
ln -s "../../../filex.pdf" "link to filex.pdf"
One of these should have worked, according to my understanding of the coreutils documentation, but alas...
I would greatly appreciate a working example of how to do this.
I come from Windows, where creating a link to another file in the very easy, and in fact available from the right-click menu. Very user-friendly. Nothing like this exists in Linus, so far as I can tell. I very much wish it did.
Meanwhile, I still need this functionality. I've dug through all the documentation I can find - the info page output, and the output from info coreutils 'ln invocation', and I still cannot get it right. I've studied a couple of tutorials on relative and absolute pathnames, and found them not useful to me, in that they didn't lead me to a working symlink creation command. I'm baffled as to why this simple operation is so elusive to me. Here's what I'm trying to do:
I have a file here: "/home/tomc/E-books/filex.pdf"
I want a link to it that will survive being moved to another location.
I've tried all these, and none actually work:
ln -s "filex.pdf" "link to filex.pdf"
ln -s "../filex.pdf" "link to filex.pdf"
ln -s "../../filex.pdf" "link to filex.pdf"
ln -s "../../../filex.pdf" "link to filex.pdf"
One of these should have worked, according to my understanding of the coreutils documentation, but alas...
I would greatly appreciate a working example of how to do this.
Comment