This chapter explains Introduction to Ls command options, Combining command options
Ls command options
This will list all the files in your current working directories including hidden files that start with .
That’s a long listing that we saw before, It shows many important information about a file. Permissions, Number of Links,Owner,Group,File size,Modification Date,File name
ls t This will list the files sorted by modification date. Newest first
ls r This will list the files in reversed fashion.
This will list the index node number of each file in the current working directory
Combining command options
● What if you want to list all the files including hidden files on your system ?
● You can just combine the a option with the R option as follows.
● ls R a
● An easier way is ls Ra The order doesn’t matter and so ls a R and ls aR will have the same results.
● Now ls Ra / will list all the files on your system, It will take long time !
● Now ls latR / will make a long listing of all the files on your system sorted by modification date (newest first).
● Becareful, The command options are case senstive, ls R (Recusrive) is not the same as ls r (reverse listing)
● If you want to list the files in reverse order based on time Then we can combine r and t so , ls tr will list the files sorted by modification date (Oldest first)