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

Explore the world of seamless email management with Zimbra Mail on Linux! Our blog delves into a step-by-step guide on harnessing the potential of Linux commands, providing easy-to-follow how-tos, and unlocking the magic of Bash scripting. Simplify your email administration journey and enhance your skills with our insightful tips and tricks.

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 huuphan.com]$ ls -lrt

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

[huupv@huupv huuphan.com]$ ls -F

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

post new :

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

This Blog is protected by DMCA.com