Learn from stackexchange
Highlight the three last updated files in ls output
grep --color -E --"$(ls -rtl | tail -n3)|$"<(ls -l)
or
ls -l|grep --color -E "$(ls -rtl | tail -n3)|$"
It uses grep with highlight on input ls -l
and uses a regular expression to search for either of the inputs for the three oldest command. It also search for the end-of-line $
in order to print the whole file.