• HOME
  • TECH BLOG
  • MIGRATING TO AMAZON WEB SERVICES
  • IT PROJECT MANAGEMENT BLOG
  • Q&A
  • INTERACTIVE LEARNING

ls -list computerfiles in linux



The ls command is usually used to view the contents of the current directory or a targeted directory where you wanted to list the files in a specific folder.



ls



The ls -l command (long list format) lists files and directories together with additional information like permissions, owner, date of creation, etc.



The ls -a command lists all data, including hidden files (dot-files).



ls



The ls -lh command lists files in a human-readable format. Unlike the ls -l command alone, which lists the size of files in bytes only, the ls -lh command will show the exact size in:
bytes(b), kilobytes(kb), megabytes(MB).



ls



If you want to know where the directories are from the output of an ls command use the ls -F. It will add a forward slash at the end of every directory name.



ls



Use The ls -R command if you want to list directories present in the path along with the files inside of them. This is called the recursive (R) feature.



The ls -ltr command shows the latest modified files or directories in order. The latest modified files are listed at the bottom while the oldest outputted files are listed at the top.


Pop-up Preset:








CERTIFIED CLOUD EXPERTS | AWS PARTNER NETWORK
CLOUD CONSULTING FIRM | (516) 387-2085 | CONTACT US