To list the contents of a directory in a Linux terminal, you can use the ls command. Here are some common usages:
-
Basic listing:
ls -
Detailed listing (shows file permissions, sizes, and modification dates):
ls -l -
Including hidden files (files that start with a dot):
ls -a -
Detailed listing including hidden files:
ls -la -
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.
