Log in

No account? Create an account
Previous Entry Share Next Entry
Unix: du and hard links
If there's no distinction between multiple hard links pointing to a single file (i.e. the second link to a file is exactly the same as the first), how does du give different results?
3.1G	./pecan.1
 20M	./pecan
 75M	./pecan.2
198M	./pecan.week1

EDIT: Don't you hate it when you answer your own question immediately, leaving no point posting? Running du -hd0 pecan gives 3.1G, whereas above that size was shown against pecan.1 (the first entry). Conclusion: du is only counting each file once, ignoring files that have already been included elsewhere.