Huu Phan | Blog Linux operating system | Linux operating system -Blog Huu Phan | www.huuphan.com

This Blog is protected by DMCA.com

huuphan.com. Powered by Blogger.

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

[[email protected] huuphan.com]$ ls -lrt

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

[[email protected] huuphan.com]$ ls -F

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

Thanks for reading ls command My blog Zimbra Mail Server,linux,bash script,centos,linux command I hope this is useful.

post new :

Huu Phan | Blog Linux operating system | Huu Phan ~ Zimbra Mail Server,linux,bash script,centos,linux command | www.huuphan.com