LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-10-2014, 01:33 PM   #1
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 810

Rep: Reputation: 264Reputation: 264Reputation: 264
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
 
Old 05-10-2014, 01:37 PM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
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.
 
Old 05-10-2014, 02:08 PM   #3
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

Rep: Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835Reputation: 835
have you tried:
Code:
cd /home/katie
ln /win/katie/ ./katieswinfiles
or some such.
anyhow,
Code:
man ln
should clarify things...
 
Old 05-10-2014, 02:23 PM   #4
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 810

Original Poster
Rep: Reputation: 264Reputation: 264Reputation: 264
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!
 
Old 05-10-2014, 05:04 PM   #5
ondoho
Senior Member
 
Registered: Dec 2013
Posts: 4,176

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Creating local NFS mounted home directory for remote LDAP authenticated user someshpr Linux - Newbie 2 12-15-2009 07:14 PM
DF / DU open file descriptor problem on CFS mounted directory kipkiller Linux - Server 1 06-30-2009 09:11 AM
Mounted Directory Permissions Problem unclebyron Linux - Server 2 01-07-2009 08:07 PM
Creating a link from "." to other directory on SCP bujecas Linux - Security 4 02-01-2007 11:54 AM
creating hard link problem cranium2004 Linux - Newbie 2 06-20-2005 06:44 AM


All times are GMT -5. The time now is 07:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration