In order to understand another answer (by glenn jackman):
find / -type d -print0 | while read -r -d '' dir; do ls -ltr "$dir" | sed '$!d'; done
the first step is to understand the usage of the option -r
of the read
command.
First, I thought, it would be sufficient to simply execute
man read
to look up the meaning of the -r
option, but I realized the man page does not contain any explanation for options at all, so I Googled for it.
I got some read -t
, read -p
examples, but no read -r
.
help read
orman bash
– steeldriver Mar 27 '15 at 00:52READ(1P)
exists for me... – jasonwryan Mar 27 '15 at 01:06read
as well andman read
will show the info for that. – feeela Dec 01 '21 at 16:56