LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem creating link to a mounted directory (https://www.linuxquestions.org/questions/linux-newbie-8/problem-creating-link-to-a-mounted-directory-4175504570/)

maples 05-10-2014 12:33 PM

Problem creating link to a mounted directory
 
Hi!
My sister will soon be using my laptop. It has a dual-boot between Windows 7 and Arch. There is a shared NTFS partition that I use for my files. I want for her to do the same, and I'm trying to make it easy for her, since she's computer illiterate. I have the Windows side figured out, it's the Linux side that I'm having trouble with. I have my fstab set up so that the shared NTFS partition is mounted under /win. In the /win directory, I have 2 folders, one for me, one for her. I would like to make a link in her home directory that she could click on that would take her to /win/katie. However, when I do
Code:

cd /home/katie
ln /win/katie

as root, it says that I can't do it. Any ideas?

Thanks

lleb 05-10-2014 12:37 PM

http://unixhelp.ed.ac.uk/CGI/man-cgi?ln

Quote:

SYNOPSIS


ln [OPTION]... [-T] TARGET LINK_NAME (1st form)
ln [OPTION]... TARGET (2nd form)
ln [OPTION]... TARGET... DIRECTORY (3rd form)
ln [OPTION]... -t DIRECTORY TARGET... (4th form)
from the looks of what you want to do you, you should be using the 3rd form of
Code:

ln <target> <directory>
but i could be way off base, ive not messed much with ln.

ondoho 05-10-2014 01:08 PM

have you tried:
Code:

cd /home/katie
ln /win/katie/ ./katieswinfiles

or some such.
anyhow,
Code:

man ln
should clarify things...

maples 05-10-2014 01:23 PM

Thank you for your suggestiond. Unfortunately, I keep getting the same result:
Code:

[root@anthonyGoodLaptop katie]# ln /win/katie/ /home/katie/
ln: ‘/win/katie/’: hard link not allowed for directory

I looked at the man page, and it didn't mention anything about links across partitions. It did mention the -s flag, so I tried it, and it works! I'm not sure why, but I'm glad that it does.

Thanks!

ondoho 05-10-2014 04:04 PM

me: facepalm!
using the -s switch is the most common and probably best way to do it.


All times are GMT -5. The time now is 05:09 PM.