Link Directory to directory (S.O.S)


 
Thread Tools Search this Thread
Operating Systems Solaris Link Directory to directory (S.O.S)
# 8  
Old 05-15-2007
hi zazzybob,

Code:
$ ln ldap foo
ln: `ldap': hard link not allowed for directory


thats hardlink you created, try ln -s ldap foo - thats a softlink.
and i've got a ln --help actually Smilie

cheers Smilie
# 9  
Old 05-15-2007
Quote:
Originally Posted by stdout
hi zazzybob,
thats hardlink you created, try ln -s ldap foo - thats a softlink.
and i've got a ln --help actually
I'm aware of what I was creating, thanks. I was responding to porter, who said "Who says you can't hardlink directories" - I was proving this to be the case.
# 10  
Old 05-16-2007
Quote:
Originally Posted by zazzybob
I was responding to porter, who said "Who says you can't hardlink directories" - I was proving this to be the case.
I must admit I'm surprised you can't, especially when a directory is nothing more than a file with a list of inodes and filenames. I checked Darwin, Linux, Solaris and AIX, all agree, you can't hard link directories. I presume this is because of the ".." entry which needs the inode of the parent, and technically and hard-linked directory would have two parents. But then also consider that "." and ".." actually are hard-links to directories.

Back to the original problem, is it due to the spelling mistake of substituting an "0" for an "o"?
# 11  
Old 05-16-2007
You can in come cases hard link directories, but only by using the link system call. No version of the ln command that I know of will allow this to be done. Here is what the SPEC had to say about link();

Quote:
If path1 names a directory, link() shall fail unless the process has appropriate privileges and the implementation supports using link() on directories.
# 12  
Old 03-26-2008
Hi,

Your problem is resolved or no ,becs i am also suffering from the same ?????
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Create a Link for a directory

Hi, I need to create a link as stagein01 for the /p11/prod/stagein01/. Please let me know the procedure for the same. Regards, VN (5 Replies)
Discussion started by: narayanv
5 Replies

2. Shell Programming and Scripting

HELP on checking for directory or symbolic link

Hi, Can anyone please advise why the following is not working as I expected it to be? Test script as below: #!/bin/ksh for checkdir in dir* do echo "Checking ${checkdir}" if ; then echo "... ${checkdir} is a directory" elif Output from sample run as below: $:... (8 Replies)
Discussion started by: newbie_01
8 Replies

3. Post Here to Contact Site Administrators and Moderators

Broken Links in the Site Link Directory

(split from another thread) Hi. Can you please post a copy of the exact link you used? I have no trouble accessing either the readme, or the link to "Featured Books and Articles by Active Forum Members - Links" Thanks. (2 Replies)
Discussion started by: Scott
2 Replies

4. UNIX for Dummies Questions & Answers

Symbolic link for an existing directory

Hi , i am trying to make a symbolic link for an existing directory, but i am facng some problems regarding the usage of command. If there is no directory i can make a symbolic link, but for an existing directory i am not able to. can anyone post me the exact usage if we already have the... (1 Reply)
Discussion started by: sahasra
1 Replies

5. UNIX for Advanced & Expert Users

Hard link a directory

Is it possible to Hard link a directory? Some people on google say it is possible and some say it is not possible. I haven't seen a working solution though. (3 Replies)
Discussion started by: cokedude
3 Replies

6. AIX

link directory across server

Hi All, I have directory "A" on server "1". I also have directory "B" on Server "2" I need to link these 2 directories "A" and "B" which are across servers. Is it possible? If so, can somebody help me on this? Thanks in advance. Mugundan (2 Replies)
Discussion started by: mjdarm
2 Replies

7. UNIX for Dummies Questions & Answers

Link to a directory

Hi Experts, Is there any way to link the contents (subdirectories/files) of a existing directory A to another existent directory B.. The relative path of /root/Directory A/ Directory A |__ Subdirectory A1 |__File A |__File B |__ Subdirectory A2 |__File A ... (6 Replies)
Discussion started by: ganga.dharan
6 Replies

8. Solaris

soft link for directory in root FS

Hi, In root folder there is one directory "/usr/sap/P38/TRX00/index" as the data is going to increase so to aviod root fs become 100% full ,we have to create one soft link that would point to another point mount created with on same disk ultimatly that New Fs(/test) will store data instead of... (2 Replies)
Discussion started by: solaris123
2 Replies

9. Shell Programming and Scripting

how link directory

I want to link directory to another directory pls confirm whether i am doing correct or not I want to link test directory to another hist directory /users/test/ ln -s /users/hist pl confirm (1 Reply)
Discussion started by: getdpg
1 Replies

10. AIX

To link a filesystem to a directory

Hi, I was wondering if someone can help me out with one of my simple problems. I have a filesystem, /oracle/dir1/sapdataA. The client has the filesystem /oracle/dir1/sapdata1. Now I want to link these 2 directories so that if I cd to /oracle/dir1 and do an ls -l I get the following output: cd... (3 Replies)
Discussion started by: brookingsd
3 Replies
Login or Register to Ask a Question