Linux- list command in Linux ls command and options in Linux : ls command is used to list the files and directories in ...
Linux- list command in Linux |
ls command and options in Linux:
ls command is used to list the files and directories in the Linux environment. Some of the options are used to get additional information about the file.
Syntax:
ls [options] [file path]
Commands:
ls ->>> list the files and directories
options:
-a --> list the hidden files and directories.
Command: ls -a
example
Command: ls -A
Example
-F --> List the Directories and mention “ / “ at the end of the directory name.
Command: ls -F
Example:
-l --> list all files and directories with a long format ( it will show the permission user name size created date and time and file and directory name)
Command: ls -l or ll --> This is the alias of ls- l
Example:
-lh --> list the file and directories in the long format as the human-readable format
Command: ls -lh
Example:
-la or -al --> list the hidden files and directories in the long format as the human-readable format.
-lah → list the hidden files directories in the long human-readable format.
Command: ls -la or ls -al
ls -lah
Example:
-r ---> list the files in reverse order
-R ----> list the all directories along with subdirectories and files.
Command:
ls -r
-0 --> list the files and directories without a group name
-g --> list the files and directories without an owners name
-t --> list the files and directories by their created time
-i --> list the files and directories with their index number or inode number
-s --> list the files and directories with their size
-S --> list the files and directories with their size large value at the top.
Using lh,lr, a to this can check them with human-readable and reverse order, hidden files as well.
Command: ls -o
Command: ls -i
Command: ls -s
ls -1 ---> list the file and directories one file per line
Command: ls -1
:
---------------------------------------!!!! Happy Learning with Techiev !!!!!!!!----------------------------------
------------------------Subscribe our Youtube Channel by clicking the below link----------------------