ls Flashcards
(17 cards)
How to list the contents of the home directory of the user logged in?
ls ~
How to list contents of multiple directories?
ls dir1 dir2
List the content in long format
ls -l
list the content in long format and also sort by time
ls -lt
Reverse the long list ordered by time
ls -lt –reverse
How to give option and long option in Linux command respectively
- and – resp
What is the general format of Linux command
Command -option arguments
Option to list all the files including hidden
-a or –all
Option to list all files except . and ..
-A or –almost-all
Means almost all
Option to list directory itself
-d or – directory
Option to list with classification
-F or – classify
Example: appends / for directory
Option to list in human readable for
-h
File size in human readable format
Option to list in long format
-l
Option to reverse the list
-r or – reverse
Option to sort the list by file size
-S
Option to sort by time
-t
Option for colour
–color