tldr/common/ls.md

342 B

ls

List directory contents

  • List all files, even hidden

ls -a

  • Sorting by size

ls -s

  • List all files with their rights, groups, owner

ls -ls

  • List all files with a prefix/suffix

ls {{prefix}}* or ls *{{suffix}}

  • Sort files by time

-t for last modified -U for date of creation -r reverses the list ls -tr