How can a dir have 17 non-hard non-sym links
So, I found a dir whose absolute path is /var/cache with the following stat info:
Code:
File: '/var/cache' I executed Code:
find /etc /usr /var /run /bin /sbin /lib64 /tmp /opt -samefile /var/cache; find -L /etc /usr /var /run /bin /sbin /lib64 /tmp /opt -samefile /var/cache I see simmilar for other dirs too / has 27 links. Perhaps these are in proc? |
There will be a hard link for (at least) each of the following...
* The directory name, directory * The directory name, directory/ * The directory self reference, directory/. * The parent reference of all sub-directories, directory/subdir/.. That can be a lot of links! |
A directory will always have at least 2 hard links. Those are the link from the parent directory and the "." link to itself. Each immediate subdirectory also has a ".." link back to its parent. Those are the only permitted hard links to a directory. Any others constitute filesystem corruption. A link count of 17 just means that there are 15 subdirectories. You can go ahead and move that whole /var/cache tree with no problem.
Or, just throw it away. After all, it's just a cache and will be repopulated automatically. About the only thing that might be worth keeping are the packages that were downloaded for installing/updating, and that's only if you have keepackages set for one or more repos. |
[solved]
Thanks, I was over thinking that one :redface: (takes gun, points at foot, changes mind, starts writing C).
|
All times are GMT -5. The time now is 04:23 PM. |