Display information about all the files in a directory by using the ls command.
Type the following command to display a long listing of all files in the current directory.
% 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 (.).
In the following example, a partial list of the files in the /sbin directory is displayed.
% cd /sbin % ls -la total 13456 drwxr-xr-x 2 root sys 512 Sep 1 14:11 . drwxr-xr-x 29 root root 1024 Sep 1 15:40 .. -r-xr-xr-x 1 root bin 218188 Aug 18 15:17 autopush lrwxrwxrwx 1 root root 21 Sep 1 14:11 bpgetfile -> ... -r-xr-xr-x 1 root bin 505556 Aug 20 13:24 dhcpagent -r-xr-xr-x 1 root bin 456064 Aug 20 13:25 dhcpinfo -r-xr-xr-x 1 root bin 272360 Aug 18 15:19 fdisk -r-xr-xr-x 1 root bin 824728 Aug 20 13:29 hostconfig -r-xr-xr-x 1 root bin 603528 Aug 20 13:21 ifconfig -r-xr-xr-x 1 root sys 556008 Aug 20 13:21 init -r-xr-xr-x 2 root root 274020 Aug 18 15:28 jsh -r-xr-xr-x 1 root bin 238736 Aug 21 19:46 mount -r-xr-xr-x 1 root sys 7696 Aug 18 15:20 mountall . . . |
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, 7696.
Date the file was created or the last date that the file was changed – For example, Aug 18 15:20.
Name of the file – For example, mountall.