[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: find -links n
Re: find -links n
Tue, 16 Jul 2013 13:10:15 +0200
Mozilla/5.0 (X11; Linux i686; rv:16.0) Gecko/20121011 Thunderbird/16.0.1
Thanks for clarification, now I can reconstruct that better.
Should I mark the question as solved? If yes, how?
Am 16.07.2013 09:21, schrieb James Youngman:
On Sun, Jul 14, 2013 at 8:49 PM, Günter Wallnig <address@hidden> wrote:
here are some more details:
164407 drwxr-x--- 2 guenter guenter 4096 2013-07-14 11:23 Ablage
it's a directory
find -links 2
this directory is't linked anyway. There are no files or other directories
Empty directories on normal Unix-like file systems have a link count
of 2. This is because they contain an entry called "." which points
to the directory itself, as well as the directory entry in the parent.
If you take an empty directory and create a sub-directory inside it
you will also see that the new child's ".." entry (which points to the
new child's parent) causes the link count on the parent to change from
2 to 3.
There is a clearer description of this, with a diagram, in section
4.14 of Richard Stevens' "Advanced Programming in the UNIX
Environment", a book I'd strongly recommend. There's also a somewhat
less clear but useful explanation at
Am 14.07.2013 21:18, schrieb James Youngman:
On Sun, Jul 14, 2013 at 11:19 AM, Günter Wallnig <address@hidden> wrote:
I believe to have found a mistake in "find" with the param "-links":
Apparently, only the second Column of the output of "ls" looks at what is
probably wrong with a directory!
Please excuse my bad English!
I'm sorry, but from what you wrote I'm not able to understand the
problem you're trying to point out. Please try again, providing more
What command did you use, precisely?
What result did you expect, precisely?
only real (hard) linked files
What result did you get, precisely?
Why do you think that's wrong?
I think, the command is normally used to find linked files. directories
can't hard linked ... a soft link doesn't exist there. The directory is
Which version of GNU findutils are you using?
find (GNU findutils) 4.4.2
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Erzeugt mit der GNU gnulib Version
Aktivierte Eigenschaften: D_TYPE O_NOFOLLOW(enabled) LEAF_OPTIMISATION
Can you reproduce the same effect using the newest version on
there are no newer version
Here are some more information about system:
Ubuntu 2.6.38-16.67-generic 18.104.22.168
I hope this helps?