This will display your ten last modified files in the current directory in reverse order so that the newest file is at the bottom for easy copy/pastin

List newest files in shell

submited by
Style Pass
2022-01-20 15:00:06

This will display your ten last modified files in the current directory in reverse order so that the newest file is at the bottom for easy copy/pasting. alias lll="ls -ltr | tail" For the newest files at the top: alias lll="ls -lt | head"

Any option you add gets passed to head or tail: lll -n 20 displays 20 entries. You can add this to .zshrc or .bashrc. Don't forget to `source .zshrh` (or .bashrc) in your current terminal to reload the aliases. Image created with @carbon_app 🙏 #shell #tweet100

Leave a Comment