ls command

In this tutorial, How do i use ls command.

The syntax ls command
ls [Option]

Full list [Option] of ls command

ls -a list all files including hidden file starting with '.'
ls -r list in reverse order
ls -R list recursively directory tree
ls -s list file size
ls -S sort by file size
ls -t sort by time & date
ls -X sort by extension name
ls --color colored list [=always/never/auto]
ls -d list directories - with ' */'
ls -F add one char of */=>@| to enteries
ls -i list file's inode index number
ls -l list with long format - show permissions
ls -la list long format including hidden files
ls -lh list long format with readable file size
ls -ls list with long format with file size

For example

List all files and folder with option list reverse order, sort by time & date

[huupv@huupv]$ ls -lrt

The different between files and folders and symbolic link and other with ls -F option

[huupv@huupv]$ ls -F

  • "/" This is directory.
  • "*" This is executables.
  • "@" This is symbolic links.
The screen output terminal


Popular posts from this blog

zimbra some services are not running [Solve problem]

How to install php7 on centos 6

Bash script list all IP addresses connected to Server