List the Ten Most Recently Modified Files
suggest changeThe following lists the most recently modified files in the current directory, using a long listing format (-l) and sorting by time (-t). head prints 10 lines, and the first line of ls -l is the total line, so head alone shows 9 files. Ask for 11 lines to keep the total and 10 files:
ls -lt | head -n 11
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents