Using ls -l

In this book, we have already spent a large amount of time using the ls command so our coverage here will be at a minimum. In this example, we will use the –l option. If you run ls -l to list your directories, you can see the owner, group, and associated permissions for any file. Some versions of ls won't show you the owner and group simultaneously with this command. Usually, they list group and owner if you add the -g option, as in ls -lg.

For an example of using ls –l, type the following:

					>ls -l
					-rw-r--r-- 1 rob  rob     2024 Dec 25 20:00 atest.tar
					drwxrwxr-x 5 rob  rob     1024 Dec 25 20:22 test
					...
				

The information that we are most concerned with dissecting is the first, third, and fourth columns. The first column identifies the owner, ...

Get SAMS Teach Yourself Unix in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.