+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.
@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
@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
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
@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
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
@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
@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
@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