In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you the "linux how to judge is a file or a directory", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "linux how to judge is a file or a directory" this article.
In linux, you can use the "ls-l" command to determine whether it is a file or a directory, the ls command is used to display the contents of the specified working directory, and the setting parameter "- l" is used to display the file form, permissions and owners. when displaying the directory, the first character is "d", and when the file is displayed, the first character is "-".
The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
How does linux tell if it's a file or a directory?
First enter the ls-l command to view the file and directory details
The first character in Linux indicates that the file is a directory, file, or linked file, and so on.
When [d], it is a directory.
When it is [-], it is a file
If [l], it is expressed as a linked document (link file)
In the case of [b], it is represented as a storage interface device (random access device) in the device file.
If [c] is expressed as a serial port device in the device file, such as keyboard and mouse (one-time reading device).
In the following characters, a combination of three parameters, all of which are "rwx"
You can see that the first character d in the file attribute is the directory, and the first character-is the ordinary file.
There is another way to judge directly through the command line color, in many books command line software, the general file is white, directory, link file is color.
The above is all the contents of the article "how linux determines whether it is a file or a directory". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more 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.
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.