Link Directory to directory (S.O.S)


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

Hello experts

We had a space problem in our SUN Box and decide to link a directory to avoid full space problem.

my current directory is /home/test/linktest and would like to link this directory to /user01/linktest.

When we try to use ln -s /home/test/linktest /usero1/linktest we got
a hard link on the target directory i.e.
ls -al
lrwxrwxrwx 1 oracle oracle 8 May 15 12:21 linktest -> linktest

Please help us.
# 2  
Old 05-15-2007
That is not a hard link, that is a symbolic link. A hard link would not have the "-> linktest" in it.

For this to work the way you expect the "linktest" directory must not exist in /home/test. Howerver it might be better to automount this directory rather than linking it.
# 3  
Old 05-15-2007
thank you for the reply.

It was a mistake, that should be a symbolic link.
By the way the problem the home/test/linktest is present and I would prefer to see
pwd
home/test/
ls -l
lrwxrwxrwx 1 oracle oracle 8 May 15 12:21 linktest -> /usero1/linktest

Please help me

By the way, how could I do automount.

Thank you
# 4  
Old 05-15-2007
hi shamsul,

ln -h will help Smilie

cheers.
# 5  
Old 05-15-2007
Quote:
Originally Posted by stdout
hi shamsul,

ln -h will help Smilie

cheers.
-h? Hmm... Never seen that before - the default behaviour of ln is to create a hard link. Anyway, you can't hard link directories - and the OP doesn't want that anyway.

Cheers,
ZB
# 6  
Old 05-15-2007
Quote:
Originally Posted by shamsul
my current directory is /home/test/linktest and would like to link this directory to /user01/linktest.

When we try to use ln -s /home/test/linktest /usero1/linktest we got
a hard link on the target directory i.e.
ls -al
lrwxrwxrwx 1 oracle oracle 8 May 15 12:21 linktest -> linktest

Please help us.
Did you do this with the spelling mistake as indicated?

Who says you can't hardlink directories? I thought the only limitation was anything hardlinked had to be on the same volume. NTFS had some limitations like this....
# 7  
Old 05-15-2007
Quote:
Originally Posted by porter
Who says you can't hardlink directories?
ln, for one:

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

Cheers
ZB
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