Bugzilla – Bug 151496
coreutils outdated - here "stat" does not correctly recognize '\n' in format string
Last modified: 2006-02-20 18:13:39 UTC
OpenSuSE 10.0 uses coreutils 5.3.0. The stat program contained in that version could not properly recognize format strings. Eg: running stat -c '%x\n' the trailing newline is ignored. Also on http://ftp.gnu.org/gnu/coreutils that version could not be found. A more recent version (eg 5.94) should be used.
There are no backslash escapes in -c.
(In reply to comment #1) > There are no backslash escapes in -c. > that is right, but: - in coreutils version 5.3.0 (as used in OpenSuSE 10.0) stat does not output a newline after each line formatted by option -c. As of version 5.94 it does. (A missing newline at the end of output is ugly - try it) - in 5.94 stat has an extra option "--printf" that does interpret backslash escapes.