Unix/Linux Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Link Directory to directory (S.O.S)

Solaris


Tags
linux, solaris

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-15-2007   -   Original Discussion by shamsul
shamsul's Unix or Linux Image
shamsul shamsul is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 10 June 2008, 1:12 AM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Sponsored Links
    #2  
Old Unix and Linux 05-15-2007   -   Original Discussion by shamsul
reborg's Unix or Linux Image
reborg reborg is offline Forum Advisor  
Administrator Emeritus
 
Join Date: Mar 2005
Last Activity: 29 March 2012, 7:00 PM EDT
Location: Ireland
Posts: 4,464
Thanks: 0
Thanked 14 Times in 12 Posts
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.
Sponsored Links
    #3  
Old Unix and Linux 05-15-2007   -   Original Discussion by shamsul
shamsul's Unix or Linux Image
shamsul shamsul is offline
Registered User
 
Join Date: Mar 2006
Last Activity: 10 June 2008, 1:12 AM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
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 Unix and Linux 05-15-2007   -   Original Discussion by shamsul
stdout's Unix or Linux Image
stdout stdout is offline
Registered User
 
Join Date: Feb 2006
Last Activity: 2 August 2009, 2:45 AM EDT
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
hi shamsul,

ln -h will help Linux

cheers.
Sponsored Links
    #5  
Old Unix and Linux 05-15-2007   -   Original Discussion by shamsul
zazzybob's Unix or Linux Image
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 2 October 2017, 12:19 PM EDT
Location: /dev/null
Posts: 2,187
Thanks: 3
Thanked 25 Times in 23 Posts
Quote:
Originally Posted by stdout
hi shamsul,

ln -h will help Linux

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
Sponsored Links
    #6  
Old Unix and Linux 05-15-2007   -   Original Discussion by shamsul
porter's Unix or Linux Image
porter porter is offline Forum Advisor  
Registered User
 
Join Date: Jan 2007
Last Activity: 8 January 2008, 6:50 PM EST
Posts: 2,965
Thanks: 0
Thanked 5 Times in 5 Posts
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....
Sponsored Links
    #7  
Old Unix and Linux 05-15-2007   -   Original Discussion by shamsul
zazzybob's Unix or Linux Image
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
 
Join Date: Dec 2003
Last Activity: 2 October 2017, 12:19 PM EDT
Location: /dev/null
Posts: 2,187
Thanks: 3
Thanked 25 Times in 23 Posts
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
Sponsored Links
Closed

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Hard link a directory cokedude UNIX for Advanced & Expert Users 3 01-17-2011 04:00 AM
link directory across server mjdarm AIX 2 05-28-2010 06:19 AM
Link to a directory ganga.dharan UNIX for Dummies Questions & Answers 6 01-29-2009 06:46 AM
how link directory getdpg Shell Programming and Scripting 1 02-02-2006 10:31 AM
To link a filesystem to a directory brookingsd AIX 3 09-29-2005 05:01 AM



All times are GMT -4. The time now is 08:07 PM.