To verify the contents of a directory in the command line, you can use the ls command. This command lists the files and directories within the specified directory.
Here are a few examples:
- To list the contents of the current directory:
ls
- To list the contents of a specific directory, for example,
backup:
ls backup/
- To get more detailed information about the contents, including permissions, owner, size, and modification date, use the
-loption:
ls -l
- To include hidden files (those starting with a dot), use the
-aoption:
ls -a
You can also combine options, for example:
ls -la
This will provide a detailed list of all files, including hidden ones.
