I started to study the Solaris in my university. Teacher told me to do a hardlink to a directory. And he said that I can not to use mount command. For example: # mount -F lofs /dir1/dir2 /dir1/hardlink2
I know that Unix doesn't allowed hardlink to a directory. I was looking for other ways but I found nothing. And I don't know how I can do this hardlink.
Do you know way how create a hardlink to a directory in Solaris?
ln
program doesn't allow a user (any user) to do it. (1) Check the man page forln
on your system. There may be an option (like-d
or-F
) to tellln
to override the restriction. (2) Check to see whether you have alink
command. (3) If those don't work, try writing a one-line C program to call thelink
system call. – G-Man Says 'Reinstate Monica' Oct 11 '14 at 18:22link
command works. Thank you very much. – Nikolay Bildeyko Oct 11 '14 at 18:30