Methods of Listing only Directories in Linux Mint 20.3
For listing only the directories of your Linux Mint 20.3 system, you can use any of the following five methods. Although each of these five methods will display the intended output in a different format, the main goal of all these methods is the same.
Method 1: Using the “ls” Command
For using the “ls” command for listing the directories of your system, you have to run it in the manner shown below:
All the directories of our system are shown in the following image:
Method 2: Pairing the “ls” Command With the “grep” Command
In this method, we will pair the “ls” command with the “grep” command for displaying all the directories of our system in the following manner:
The directories of our system, along with their access permissions, are shown in the following image:
Method 3: Using the “find” Command
This method will use the “find” command to list down all the directories of the Linux Mint 20.3 system. You simply need to run the following command:
All the directories of our system are shown in the following image:
Method 4: Using the “echo” Command
Now, we will use the “echo” command in the following manner for displaying all the directories of our Linux Mint 20.3 system on the terminal:
The following image displays all the directories of our system:
Method 5: Using the “printf” Command
Finally, we will be using the “printf” command in the following manner for displaying all the directories of our system:
All the directories of our Linux Mint 20.3 system are shown in the following image:
Conclusion
This article discussed some methods of listing only the directories of a Linux Mint 20.3 system. We shared with you five methods you can use easily. You can pick any of these methods and follow them to display only the directories of your Linux Mint 20.3 system.