Unix/Linux Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Hard link a directory

UNIX for Advanced & Expert Users


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 01-14-2011
cokedude cokedude is offline
Registered User
 
Join Date: Feb 2010
Last Activity: 6 December 2014, 7:16 PM EST
Posts: 408
Thanks: 28
Thanked 9 Times in 9 Posts
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.
Sponsored Links
    #2  
Old Unix and Linux 01-14-2011
citaylor's Unix or Linux Image
citaylor citaylor is offline
Registered User
 
Join Date: Jul 2010
Last Activity: 9 August 2011, 2:12 AM EDT
Location: Somerset, UK
Posts: 405
Thanks: 0
Thanked 72 Times in 70 Posts
Historically its always been impossible. My linux still reports it as being impossible. Ive never witnessed it working.
Sponsored Links
    #3  
Old Unix and Linux 01-14-2011
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 14 April 2015, 8:02 PM EDT
Posts: 6,398
Thanks: 288
Thanked 675 Times in 644 Posts
It is impossible. If you must link directories, use a soft link.
    #4  
Old Unix and Linux 01-17-2011
hergp hergp is offline Forum Advisor  
Problem Eliminator
 
Join Date: Jan 2010
Last Activity: 24 April 2015, 8:39 AM EDT
Location: Vienna, Austria
Posts: 813
Thanks: 19
Thanked 174 Times in 156 Posts
Hardlinks on directories are not impossible by design - the mkdir system call produces them, look at the "." and ".." entries in the newly created directory - but they are dangerous, because this capability may produce loops in the file hierarchy or otherwise corrupt the file system. (taken from the POSIX man page for the link system call/function, see: Man Page for link (POSIX Section 3) - The UNIX and Linux Forums). Therefore they are not allowed on most Unix implementations.
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Difference between hard link and soft link kamakshi s UNIX for Dummies Questions & Answers 2 06-26-2008 08:05 AM
Hard Link vs SOft Link???? skyineyes UNIX for Dummies Questions & Answers 3 05-29-2008 12:38 PM
need some info about symbolic link and hard link detective linux UNIX for Dummies Questions & Answers 2 01-08-2008 06:36 AM
Difference between hard link and soft link in unix RAJACHOKALINGAM UNIX for Dummies Questions & Answers 2 08-01-2006 04:10 AM
Differences between hard link and soft link penguin-friend UNIX for Advanced & Expert Users 3 03-08-2002 02:49 PM



All times are GMT -4. The time now is 06:59 AM.