Use the ls -ld to display detailed information about a directory, but not its contents.

Examples

In this example, the user displays the long (detailed) listing for files in the snoopy directory, a subdirectory of the current directory.

$ cd
$ ls -l snoopy
total 6
drwxr-xr-x 2 charles other 512 dec 12 11:10 Hero
drwxr-xr-x 2 charles other 512 mar 11 11:10 minerals
drwxr-xr-x 2 charles other 512 mar 11 11:10 rocks
$

In the next example, the user displays information about only the directories stored under the snoopy directory.

$ ls -ld snoopy
drwxr-xr-x 5 charles other 512 dec 4 13:43 snoopy
$

This example uses the -R option to display the contents of the snoopy directory and all its subdirectories.

Example

$ pwd
/home/charles
$
 
$ ls -R snoopy
file1 file2 file3
$