How to use "ls" Bash command . 10 tips and tricks



  
   In this post, I'm going to share practical tips on how to use "ls" command . These command I found useful when dealing with Linux environment . You can mix up the command base on it's function as how I show in the video

Content List 

1. List all entries -a
2. List all details file and directories -l
3. List one file per line -1
4. List file size in human readable form -h
5. List directory details -ld
6. List file base on last modified time -lt
7. List file  base on reverse  last modified time -ltr
8. List file directory recursively -R
9 . List file inode -i
10 . List  file alphabetically by extension


1. List all entries "ls -a"

ls -a

2. List all details file and directories  "ls -l"

ls -l

3. List one file per line "ls -1"
ls -1


4. List file size in human readable form  "ls -h"

ls -lh



5. List directory details  "ls -ld"

ls -ld


6. List file base on last modified time "ls -lt"

ls -lt

7. List file  base on reverse  last modified time  "ls -ltr"

ls -ltr

8. List file directory recursively  "ls -R"

ls -R

9 . List file i-node  "ls -i"

i-node or index node is a data structure  base on Unix style filesystem .Each i-node stores the attributes and disk block locations of the filesystem object's data. For more information please visit here .

ls -i

10 . List  file alphabetically by extension "ls -X"

ls -X




Read Previous :How to use rsync .8 tips and tricks
Read Next:How to resize image file on Ubuntu (easy)