I'm trying to define symlink and hardlinks between directories and files.
For example, I defined the path:
/mnt/data/d1/myp And I wrote the command like that for symlink.
ln -s /etc/passwd /mnt/data/d1/myp Here, myp should be a file.
Also, I defined a path for my directory.
/mnt/data/myd And I wrote the command like that for symlink:
ln -s /mnt /mnt/data/myd Here, myd should be a directory.
Link count:
12 lrwxrwxrwx. 1 sys sys 4 Jan 8 13:20 myd -> /mnt My question is this: Should I write the paths of directories and files differently? Or should they be written the same? Is it correct that I did?
01 Answer
There is no need to name symlinks to files and folders differently, unless it helps you organize your files. In short, there's nothing wrong with what you have done so far.