ls command in UNIX:
ls command in UNIX is used to lists the files and directories from the Unix directory.
Ex:
Options in ls command in Unix:
ls -l :
Long listing of files. List in long format, giving mode, number of links, owner, group, size in bytes and time of last modification for each file.
Ex:
ls -r:
To reverse the order of sort to get reverse (descending) collation or oldest first, as appropriate.
Ex:
ls -t:
To sort by time modified (latest first) before sorting alphabetically.
Ex:
In the real world, most of the time we will be using the command “ls -lrt” to list the files in the orders.
Ex:
- By looking at the above examples, you can easily identify the difference between the each commands.
- There are many number of options available in Unix for ls command. You can get to know each option using man command.
Other UNIX Commands:
Below are the list of basic UNIX commands used in UNIX operation system.
1. ls Command in Unix
2. Man Command in Unix
3. More Command in Unix
4. Vi or View Command in Unix
5. Touch Command in Unix
6. Mv Command in Unix
7. Cp Command in Unix
8. Rm Command in Unix
9. Cat Command in Unix
10. Diff Command in Unix
11. Wc Command in Unix
12. Chmod Command in Unix
13. Gzip Command in Unix
14. Gzcat Command in Unix
15. Gunzip Command in Unix
16. Directories Command in Unix