How to list available directories?

To list available directories in your current working directory, you can use the ls command with the -d option combined with a wildcard. Here’s how to do it:

ls -d */

This command will display all directories in the current location. The trailing slash (/) indicates that you want to list only directories.

If you want to see more details about the directories, you can use:

ls -l | grep ^d

This command lists all files and directories in long format and then filters the output to show only directories (lines starting with d).

Feel free to run these commands in your terminal to see the available directories!

0 Comments

no data
Be the first to share your comment!