How Do You List Directories Traits without Traversing into Their Contents?

Problem Scenario
You want to find out the permissions, ownership and groups associated with various subdirectories in Linux.  You do not want to display the lengthy contents of these directories.  How do you use the ls command to show the attributes of the directories themselves and not the contents of the directories?

Solution
From a Linux command prompt, run this command:  ls -ld /parentdirectory/

For PowerShell to list files without traversing into their contents use either of these two commands:
dir
ls

Leave a comment

Your email address will not be published. Required fields are marked *