In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Today, the editor will take you to understand the usage of the ls command in Linux. The knowledge points in the article are introduced in great detail. Friends who feel helpful can browse the content of the article with the editor, hoping to help more friends who want to solve this problem find the answer to the problem. Let's follow the editor to learn more about "what is the usage of the ls command in Linux".
In the Linux system, users can use dir and ls commands when viewing directory contents, but the ls command is often used and is listed as the preferred command by many users.
1. Running the ls command without any parameters will list the contents of the current working directory:
* *
2. To list the contents of any directory, for example, the / etc directory uses the following command:
$ls / etc
3. A directory always contains some hidden files (at least two), so to display all files in the directory, use the-an or-all flag:
$ls-a
4. You can also print the details of each file output, such as file permissions, number of links, owner name and group owner, file size, last modified time, and file / directory name:
This is set by the-l option, which means a list format as long as the screenshot below.
$ls-l
Sort files based on date and time
1. To list files in a directory and sort the date and time of the last modification, use the-t option in the following command:
$ls-lt
2. If you want a reverse sorting file based on date and time, you can use the-r option to work like this:
$ls-ltr
Thank you for your reading. This is the whole content of "what is the use of ls command in Linux". Friends who have learned it, let's get started. I believe that the editor will certainly bring you better quality articles. Thank you for your support to the website!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.