]> git.ipfire.org Git - thirdparty/coreutils.git/commit
ls: support --time=creation to show/sort birth time
authorPádraig Brady <P@draigBrady.com>
Thu, 2 Jan 2020 16:20:13 +0000 (16:20 +0000)
committerPádraig Brady <P@draigBrady.com>
Mon, 3 Feb 2020 19:37:56 +0000 (19:37 +0000)
commit2cecc3cc994b570efac9c377fa7fd0ef7e1ad122
tree52f09a72c9a93fa89e2c4440dc0f23b59759b1f6
parentdda53d75a89c5dda63c51b05c3e9953de471fd4c
ls: support --time=creation to show/sort birth time

* src/ls.c (usage): Reorganize help for --time,
and add description for --time=birth.
(do_statx): Store btime in mtime if available.
(get_stat_btime): A new function to read the creation time
from the appropriate stat structure member.
(cmp_btime): A new function to compare birth time.
(print_long_format): Output '?' when birth time unavailable.
* doc/coreutils.texi: Document --time={birth,creation}.
* tests/local.mk: Reference the new test.
* tests/ls/birthtime.sh: Add a new test.
* NEWS: Mention the new feature.
NEWS
doc/coreutils.texi
src/ls.c
tests/local.mk
tests/ls/birthtime.sh [new file with mode: 0755]