Documentation fix for 'ls' and hard links.

* compile.texi (Compilation Functions):
* files.texi (File Attributes, Changing Files):
Use current format for GNU 'ls' output.
(File Attributes): Fix problem introduced in previous change:
the link count is the number of hard links, not the number
of hard links + 1.
This commit is contained in:
Paul Eggert 2013-06-10 13:26:20 -07:00
parent e7b41c4c9a
commit 08c0a604a2
3 changed files with 37 additions and 27 deletions

View file

@ -1,3 +1,13 @@
2013-06-10 Paul Eggert <eggert@cs.ucla.edu>
Documentation fix for 'ls' and hard links.
* compile.texi (Compilation Functions):
* files.texi (File Attributes, Changing Files):
Use current format for GNU 'ls' output.
(File Attributes): Fix problem introduced in previous change:
the link count is the number of hard links, not the number
of hard links + 1.
2013-06-10 Xue Fuqiao <xfq.free@gmail.com>
* files.texi (File Attributes): Fix typo.

View file

@ -181,8 +181,8 @@ after compiling it. Interactively, @var{load} is the prefix argument.
@example
@group
% ls -l push*
-rw-r--r-- 1 lewis 791 Oct 5 20:31 push.el
$ ls -l push*
-rw-r--r-- 1 lewis lewis 791 Oct 5 20:31 push.el
@end group
@group
@ -191,9 +191,9 @@ after compiling it. Interactively, @var{load} is the prefix argument.
@end group
@group
% ls -l push*
-rw-r--r-- 1 lewis 791 Oct 5 20:31 push.el
-rw-rw-rw- 1 lewis 638 Oct 8 20:25 push.elc
$ ls -l push*
-rw-r--r-- 1 lewis lewis 791 Oct 5 20:31 push.el
-rw-rw-rw- 1 lewis lewis 638 Oct 8 20:25 push.elc
@end group
@end example
@end deffn
@ -232,7 +232,7 @@ If @var{noforce} is non-@code{nil}, this function does not recompile
files that have an up-to-date @samp{.elc} file.
@example
% emacs -batch -f batch-byte-compile *.el
$ emacs -batch -f batch-byte-compile *.el
@end example
@end defun

View file

@ -1139,8 +1139,8 @@ both others and group, and that the sticky bit is set.
@end group
@group
% ls -l diffs
-rw-rw-rw- 1 lewis 0 3063 Oct 30 16:00 diffs
$ ls -l diffs
-rw-rw-rw- 1 lewis lewis 3063 Oct 30 16:00 diffs
@end group
@end example
@ -1166,17 +1166,17 @@ target. However, they both recursively follow symbolic links at all
levels of parent directories.
@defun file-nlinks filename
This function returns the number of names (i.e., hard link(s) + 1)
that file @var{filename} has. If the file does not exist, then this
function returns @code{nil}. Note that symbolic links have no effect
on this function, because they are not considered to be names of the
files they link to.
This function returns the number of names (i.e., hard links) that
file @var{filename} has. If the file does not exist, this function
returns @code{nil}. Note that symbolic links have no effect on this
function, because they are not considered to be names of the files
they link to.
@example
@group
% ls -l foo*
-rw-rw-rw- 2 rms 4 Aug 19 01:27 foo
-rw-rw-rw- 2 rms 4 Aug 19 01:27 foo1
$ ls -l foo*
-rw-rw-rw- 2 rms rms 4 Aug 19 01:27 foo
-rw-rw-rw- 2 rms rms 4 Aug 19 01:27 foo1
@end group
@group
@ -1477,9 +1477,9 @@ In the first part of the following example, we list two files,
@example
@group
% ls -li fo*
81908 -rw-rw-rw- 1 rms 29 Aug 18 20:32 foo
84302 -rw-rw-rw- 1 rms 24 Aug 18 20:31 foo3
$ ls -li fo*
81908 -rw-rw-rw- 1 rms rms 29 Aug 18 20:32 foo
84302 -rw-rw-rw- 1 rms rms 24 Aug 18 20:31 foo3
@end group
@end example
@ -1494,10 +1494,10 @@ the files again. This shows two names for one file, @file{foo} and
@end group
@group
% ls -li fo*
81908 -rw-rw-rw- 2 rms 29 Aug 18 20:32 foo
81908 -rw-rw-rw- 2 rms 29 Aug 18 20:32 foo2
84302 -rw-rw-rw- 1 rms 24 Aug 18 20:31 foo3
$ ls -li fo*
81908 -rw-rw-rw- 2 rms rms 29 Aug 18 20:32 foo
81908 -rw-rw-rw- 2 rms rms 29 Aug 18 20:32 foo2
84302 -rw-rw-rw- 1 rms rms 24 Aug 18 20:31 foo3
@end group
@end example
@ -1519,10 +1519,10 @@ contents of @file{foo3} are lost.
@end group
@group
% ls -li fo*
81908 -rw-rw-rw- 3 rms 29 Aug 18 20:32 foo
81908 -rw-rw-rw- 3 rms 29 Aug 18 20:32 foo2
81908 -rw-rw-rw- 3 rms 29 Aug 18 20:32 foo3
$ ls -li fo*
81908 -rw-rw-rw- 3 rms rms 29 Aug 18 20:32 foo
81908 -rw-rw-rw- 3 rms rms 29 Aug 18 20:32 foo2
81908 -rw-rw-rw- 3 rms rms 29 Aug 18 20:32 foo3
@end group
@end example