About the ls command that you may be too embarrassed to ask about

table of contents
Hello, this is Okazaki from the System Solutions Department
When managing a server,
the command "ls" is often used to check file and directory information.
is also a command that everyone probably used when they were a new employee or when they first came into contact with a server
.
I would like to introduce the "ls" command, one of the commands that server administrators are likely to use frequently
What is the ls command?
The ls command displays information about directories and files.
By adding options when displaying,
you can display various information about files and directories.
How to use
The basic usage is as follows:
$ ls [options] [file or directory]
(Example 1)
If you want to get the file/directory access permissions, owner size, and last update date, add the "-l" option as follows
$ ls -l [file or directory]
(Example 2)
If you want to see hidden files that start with ".", add the "-a" option
$ ls -a [file or directory]
(Example 3)
If you want the display order to be in the order of the last update time, add "-t", and if you want to display the order in reverse, add "-r"
$ ls -t [file or directory]
$ ls -r [file or directory]
(Example 4)
You can also combine all the commands you've seen so far
$ ls -altr [file or directory]
(Example 5)
summary
Although it is a command that is frequently used in daily operations and tasks,
we often forget what it is and have to search for it, or
we only use certain options for the commands we normally use, but when we look into them again, we
find that there are some options that are surprisingly useful.
This time we introduced some of the options for the "ls" command, but
there are many more options, so we would like to introduce more in the future.
1