In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the relevant knowledge of "how to use the Linux fuser command". The editor shows you the operation process through an actual case. The operation method is simple, fast and practical. I hope this article "how to use the Linux fuser command" can help you solve the problem.
The Linux common command fuser command is used to report files and network sockets used by the process.
Fuser uses files or file structures to identify processes
Supplementary note: the fuser command lists the process number of the local process, which uses file, and the local or remote file specified by the parameter. For blocking a special device, this command lists the processes that use any file on that device.
Each process number is followed by a letter indicating how the process uses the file.
C: indicates the working directory of the process.
E: indicates that the file is the executable of the process (that is, the process is pulled by the file).
F: indicates that the file is opened by the process, and the f character is not displayed by default.
F: indicates that the file is opened for writing by the process, and the F character is not displayed by default.
R: indicates that the directory is the root of the process.
M: instructs the process to use this file for memory mapping, or whether the file is a shared library file and is mapped to memory by the process.
Syntax fuser (option) (parameter) option-a: display all files specified on the command line;-k: kill all processes accessing the specified file;-I: need user confirmation before killing the process;-l: list all known signal names;-m: specify a loaded file system or a loaded block device;-n: select a different namespace -u: displays the user name after each process. Parameter file: can be a file name or TCP, UDP port number.
Instance to list the process number of the local process that uses the / etc/passwd file, enter:
Fuser / etc/passwd to list the process number and user login name of the process that uses the / etc/filesystems file, enter:
Fuser-u / etc/filesystems to terminate all processes that use a given file system, enter:
Either the fuser-k-x-u-c / dev/hd1 or fuser-kxuc / home command lists the process number and user name, and then terminates each process that is using the / dev/hd1 (/ home) file system. Only root users can terminate processes that belong to another user. If you are trying to unmount the / dev/hd1 file system and a process accessing the / dev/hd1 file system does not allow this, you may want to use this command.
To list all processes that are using files that have been deleted from a given file system, enter:
The fuser-d / usr file / dev/kmem is used for system images. / dev/mem is also used for system images.
This is the end of the introduction to "how to use the Linux fuser command". Thank you for reading. If you want to know more about the industry, you can follow the industry information channel. The editor will update different knowledge points for you every day.
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.