A hard link is file system entry that associates a name with another file on a file system.

learn more… | top users | synonyms (1)

12
votes
1answer
789 views

How to find all the links to a directory

When I stat a directory I get a listing that tell me there are 5 links to the directory. stat dir My question is how do I get information (names and locations) to all these 5 links?
0
votes
0answers
106 views

Purpose of hard link and soft link [duplicate]

Possible Duplicate: What is the difference between symbolic and hard links? I've read quite a few articles regarding hard links and soft links, but I still dont understand the purpose of ...
2
votes
0answers
92 views

Hard links vs. Soft links: When would you want to use one over the other? [duplicate]

Possible Duplicate: What is the difference between symbolic and hard links? Today, my teacher talked about the differences between 'hard links' and 'soft links', but she never really ...
33
votes
2answers
1k views

Why is '.' a hard link in Unix?

I've seen many explanations for why the link count for an empty directory in Unix based OSes is 2 instead of 1. They all say that it's because of the '.' directory, which every directory has pointing ...
58
votes
4answers
15k views

Why hard links not allowed to directories in UNIX/Linux

I read in text books that UNIX/Linux doesn't allows hard links to directories but soft links do. Is it because, when we have cycles and if we create hardlinks, and after some time we delete the ...
24
votes
5answers
4k views

Why do hard links exist?

I know what hard links are, but why would I use them? What is the utility of a hard link?
1
vote
1answer
951 views

Backing up hard links (rsync)?

My question begins with: Do I actually have hard links on my disk at all (except for "." and ".." of course)? I'm not sure how I would find that out? If no, the question is already answered. If yes, ...
28
votes
7answers
10k views

What is the difference between symbolic and hard links?

When would you use one over the other?
14
votes
3answers
2k views

Is there a limit of hardlinks for one file?

Is there a limit of number of hardlinks for one file? Is it specified anywhere? What are safe limits for Linux? And what for other POSIX systems?
8
votes
5answers
3k views

Can I determine the number of sub-directories in a directory using `ls -l`?

When displaying directories using ls -l, their number of links (the second field in the output) is at least two: one for the dir name and one for . $ mkdir foo $ ls -l total 2 drwxr-xr-x 2 user ...
9
votes
4answers
563 views

filesystem for archiving

I have some complex read-only data in my file system. It contains thousands of snapshots of certain revisions of a svn repository, and the output of regression tests. Identical files between snapshots ...
1
vote
2answers
915 views

Keep tracking of symbolic links?

I use symbolic links quite often, but after moving the original file, I lose track of the symbolic link. I also use symbolic links for keeping track of some files in the same directory, but again, I ...
4
votes
4answers
427 views

Symbolic link and hard link questions

Let's say /A/B/c.sh is symbolic linked to /X/Y/c.sh. If c.sh has the command "./SOMETHING", '.' means /A/B/ or /X/Y/? How about the hard link?