Question - What is the 'ls' command and what it does?
Answer -
It is one of the basic commands in Linux. It is used to list all the files and directories in the file system.zom
Syntax:
ls [OPTIONS] [FILES]
We can use it without passing the arguments, then it will list all the files in the current working directory. Files will be displayed in alphabetical order.
Is
To list the specific directory files use the directory name in the syntax, follow as shown in the below syntax.
ls /etc
We can also pass multiple directories names in the syntax, but separated by space.
ls /etc /var /etc/passwd