In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "the method of using fuser tool to query files on Linux". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "the method of using fuser tool to query files on Linux".
Lsof has a similar function, it can also find the process that is accessing the specified file, the difference between the two is that fuser can kill those processes that are accessing the specified file at once.
The common occasions for fuser are:
Fuser can be used to query files, directories, socket ports, and file system usage processes, and you can use fuser to shut down processes.
When the file system umount reports device busy, it is often used to fuser to query and shut down processes that use the corresponding file system. (it can be used when switching DRBD.)
Mode of use:
Basically, most of the content can be displayed with-v:
The consumer under the / root directory, the c after the process ID,PID represents the working directory of the process, followed by the specific command
Access has other options:
E: this file is the executable file of the process
F: the file is opened by the process and is not displayed by default
F: the file is opened and written by the process. F is not displayed by default.
R: indicates that the directory is the root of the process
M: indicates that the process uses this file for memory mapping, or the file is a shared library file and is mapped to memory by the process
Query the users of the socket port:
View the usage of a file system:
Kill drops the process that a file is accessing:
Fuser sends SIGKILL signals to related processes. In addition to sending SIGKILL signals, fuser can also send the following signals:
Fuser-v-k filename
To end all processes of accessing a file system:
Fuser-ck / data (the directory where a file system is mounted)
At this point, I believe you have a deeper understanding of "the method of using fuser tools to query files on Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.