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.
When I stat a directory I get a listing that tell me there are 5 links to the directory.
My question is how directories are implemented? I can believe a data structure like a variable e.g. table, array or similar. Since UNIX is Open Source I can look in the source what the program does when it created a new directory. Can you tell me where to look or elaborate on the topic? That a directory “is” a file I could understand and is a directory really a file? I’m not sure that it is true that files are stored “in” files while still in way you could say the word file about nearly anything and I’m not sure what absolutely not is a file since you could call even a variable a file. For example a link is certainly not a file and a link is like a directory but then this violates that a directory is a file?
I have a folder with some directories and some files (some are hidden, beginning with dot).
I read this up on this website and it doesn’t make sense.
Let’s say you have directories /dir1 and /dir2/linked, where the latter is a symlink to the former.
I want to recursively delete all files not accessed in a while in folder a, except all files in the subfolder b.
I often want to do some variant of this idiom:
I want to cp aaa/deep/sea/blob.psd to bbb/deep/sea/blob.psd