How to list directory contents?

QuestionsQuestions8 SkillsProBasic Files OperationsAug, 13 2025
0136

To list the contents of a directory in a Linux terminal, you can use the ls command. Here are some common usages:

  1. Basic listing:

    ls
  2. Detailed listing (shows file permissions, sizes, and modification dates):

    ls -l
  3. Including hidden files (files that start with a dot):

    ls -a
  4. Detailed listing including hidden files:

    ls -la
  5. Listing with human-readable file sizes:

    ls -lh

You can combine options as needed. For example, ls -la will give you a detailed list of all files, including hidden ones.

0 Comments

no data
Be the first to share your comment!