In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the use of linux ls command to display the content and attribute information under the specified working directory, the article is very detailed, has a certain reference value, interested friends must read it!
The ls command is one of the most commonly used instructions under Linux. The ls command is an abbreviation for the English word list, just as the English word list means. Its function is to list the contents of the specified directory and their related attribute information.
By default, the ls command lists the contents of the current directory. With parameters, we can do more with ls. As the most basic and frequently used command, it is necessary for us to figure out the usage of the ls command, so let's take a look!
Syntax format: ls [options] [file]
Common parameters:
-a displays all files and directories (including "." Hidden files at the beginning)-l lists files and directory information in a long format-r displays files in reverse order (default in English alphabetical order)-t sorts according to the last modification time-An is the same as-a, but does not list "." (current directory) and ".." (parent directory)-S sorts by file size-R recursively lists all subdirectories
Reference example
List all files (including hidden files):
[root@linuxcool] # ls-a
List the details of the file:
[root@linuxcool ~] # ls-l
List all directories under the root directory (/):
[root@linuxcool ~] # ls /
List all files in the current working directory whose names begin with "s":
[root@linuxcool] # ls-ltr s*
List details of all directories and files under the / bin directory:
[root@linuxcool ~] # ls-lR / bin
List all files and directories under the current working directory and sort by file size:
[root@linuxcool ~] # ls-AS above is to use the ls command in linux to display the contents and attribute information under the specified working directory. Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.