In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the Linux commonly used command fuser how to use, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.
Linux common command fuser command displays the process number with the specified file or file system, and by default each file name is followed by a letter to indicate the type
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.
Example 1
[root@redhat] # fuser-l # display signal HUP INT QUIT ILL TRAP ABRT IOT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM TERM STKFLT CHLD CONT STOP TSTP TTIN TTOU URG XCPU XFSZ VTALRM PROF WINCH IO PWR SYS UNUSED [root@redhat] # fuser-a / root # shows the processes related to the / root directory / root: 4552c 4630c 4661c 4664c 4666c 4669c 4671c 4732c 4733c 4735c 4736c 4741c 4743c 474450c 47441c 47751c 4767c 11065c 30632c 31755c [root@redhat ~] # fuser-k / root # kill and / root directory related processes / root: 4552c 4630c 4664c 4666c 4669c 4671c 4732c 4733c 4736c 4740c 4741c 4743c 4744c 4750c 4751c 4767c 11065c 30632c 31755c case 2
# fuser-uv. # query the processes in the current directory USER PID ACCESS COMMAND.: root 3784.. c.. (root) bash root 3815.. c.. (root) bash root 9998.. c.. (root) bash root 28673.. c.. (root) vi case 3
[root@localhost test] # fuser-km / dev/sdb2 / dev/sdb2: 7251c / / kill the mount user in use, and the following execution result is [root@localhost test] # cd / mnt [root@localhost mnt] # Connection closing...Socket close. Connection closed by foreign host. Disconnected from remote host (New session) at 15:50:05. Type `help' to learn how to use Xshell prompt. [d:\] $Thank you for reading this article carefully. I hope the article "how to use Linux commands fuser" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you 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.