|noname on nfs mount: mount: /mount/point…|
|rb on hpacucli|
|nimish on hpacucli|
|Barznj on hpacucli|
|Mr WordPress on mpathadm|
Just another WordPress.com site
List information about the file/directory.
$ ls -l /
$ drwxr-xr-x 4 root root 4096 2011-05-01 09:00 boot
1st Character – File Type: First character specifies the type of the file.
- normal file
s socket file
l link file
Field 1 – File Permissions: Next 9 character specifies the files permission.
Field 2 – Number of links: Second field specifies the number of links for that file.
In this example, number of links is 4.
Field 3 – Owner: Third field specifies owner of the file.
In this example, this file is owned by username ‘root’.
Field 4 – Group: Fourth field specifies the group of the file.
In this example, this file belongs to ”root’ group.
Field 5 – Size: Fifth field specifies the size of file.
In this example, ’4096′ indicates the file size.
Field 6 – Last modified date & time.
Field 7 – File name
List classification of folder/file:
$ ls -F /
/ – directory
nothing – normal file
@ – link file
* – Executable file
Human readable format:
$ ls -lh
List directory info:
$ ls -ld /etc
List all hidden files:
$ ls -a
$ ls -A
List all subfiles:
$ ls -R /boot
$ ls -i /
Display UID and GID:
$ ls -n /
Display single entry:
$ ls -1 /
Sorts the file by modification time:
$ ls -t
Edit last modified file:
$ vi `ls -t | head -1`
ls -t = sorts the file by modification time
head -1 = first file
List file by alphabet from a to z:
$ ls [a-z]*
List file by alphabet a and k only:
$ ls [ak]*