ln: hard link not allowed for directory



Share this article :

Symptom

You want to create a hard link from/to a directory but getting an error as below,

# ln test/ test2/
ln: `test/': hard link not allowed for directory

Solution

Hard link is not allowed for directories pointing. You need to use symbolic/soft link instead. Please refer to http://itsiti.com/ln-make-links-between-files-creating-hard-soft-links-steps for steps to create symbolic/soft link for directories.

Related posts

mv: Move (Rename) Files in UNIX, Linux
userdel: Delete User Account in UNIX & Linux
Stale NFS file handle error in UNIX/Linux
Play Audio (MP3, OGG, WAV) Files in UNIX & Linux via Command Line
© 2016 ITsiti. All Rights Reserved
Powered by KEEM