Display information about all the files in a directory by using the ls command.
% ls -la
Displays the long format that includes user ownership, group ownership, and file permissions.
Displays all files, including hidden files that begin with a dot (.).
For all options to the ls command, see the ls(1) man page.
In the following example, a partial list of the files in the /sbin directory is displayed.
% cd /sbin % ls -l total 4960 -r-xr-xr-x 1 root bin 12756 Dec 19 2013 6to4relay lrwxrwxrwx 1 root root 10 Dec 19 2013 accept -> cupsaccept -r-xr-xr-x 1 root bin 38420 Dec 19 2013 acctadm -r-xr-xr-x 2 root sys 70512 Dec 19 2013 add_drv -r-xr-xr-x 1 root bin 3126 Dec 19 2013 addgnupghome drwxr-xr-x 2 root bin 37 Dec 19 2013 amd64 -r-xr-xr-x 1 root bin 2264 Dec 19 2013 applygnupgdefaults -r-xr-xr-x 1 root bin 153 Dec 19 2013 archiveadm -r-xr-xr-x 1 root bin 12644 Dec 19 2013 arp . . .
Each line displays information about a file in the following order:
Type of file – For example, d. For list of file types, see File and Directory Ownership.
Permissions – For example, r-xr-xr-x. For description, see File and Directory Ownership.
Number of hard links – For example, 2.
Owner of the file – For example, root.
Group of the file – For example, bin.
Size of the file, in bytes – For example, 12644.
Date the file was created or the last date that the file was changed – For example, Dec 19 2013.
Name of the file – For example, arp.