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
READ(1P)
exists for me...read
as well andman read
will show the info for that.