👤
Home Man
Search
Today's Posts
Register

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)

Tags
linux, solaris

👤 Login to reply

 
Thread Tools Search this Thread
# 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

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

ln -h will help

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 to reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Create a Link for a directory narayanv Solaris 5 08-06-2013 04:32 PM
HELP on checking for directory or symbolic link newbie_01 Shell Programming and Scripting 8 09-01-2012 08:59 PM
Broken Links in the Site Link Directory Scott Post Here to Contact Site Administrators and Moderators 2 01-02-2012 04:52 AM
Symbolic link for an existing directory sahasra UNIX for Dummies Questions & Answers 1 04-29-2011 01:43 AM
Hard link a directory cokedude UNIX for Advanced & Expert Users 3 01-17-2011 03:00 AM
link directory across server mjdarm AIX 2 05-28-2010 05:19 AM
Link to a directory ganga.dharan UNIX for Dummies Questions & Answers 6 01-29-2009 05:46 AM
soft link for directory in root FS solaris123 Solaris 2 04-01-2008 02:25 AM
how link directory getdpg Shell Programming and Scripting 1 02-02-2006 09:31 AM
To link a filesystem to a directory brookingsd AIX 3 09-29-2005 04:01 AM


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

Unix & Linux Forums Content Copyrightę1993-2018. All Rights Reserved.
×
UNIX.COM Login
Username:
Password:  
Show Password