In Linux, the fuser tool can be used to query the user of the file. In addition, the fuser has many uses and can be used with parameters. The following small series will give you a detailed introduction to the use of the fuser tool. It is helpful to you.
lsof also has a similar function, it can also find the process that is accessing the specified file, the difference between the two is that the user can kill the process that is accessing the specified file at a time.
The common use of fuser is:
fuser can be used to query the use of files, directories, socket ports and file systems, and can use fuser to close the process.
When the file system umount reports that the device is busy, it is common to the fuser to query and close the process using the corresponding file system. (At the time of switching may be used DRBD oh);
use:
substantially that substantially most of the contents may be displayed with -v:
The user in the /root directory, the process ID, the c after the PID represents the working directory of the process, followed by the specific command;
access has other options:
e: The file is the executable file of the process;
f: The file is opened by the process, the default f is not displayed;
F: The file is opened by the process and written, the default F is not displayed ;
r: indicates that the directory is the root directory of the process;
m: indicates that the process uses the file for memory mapping, or the file is a shared library file, which is mapped to memory by the process; br>
situation socket port users query:
View a file system usage:
kill off access to a file is Process:
The fuser sends a SIGKILL signal to the relevant process. In addition to sending SIGKILL signal outside, fuser can also send the following signals:
fuser -v -k filename;
To end all processes for access to a file system:
fuser -ck /data (directory of a file system mount);
The above is the introduction of the method of using the fuser tool in Linux. The fuser plus -v can display the process content and can be on the socket. The port user's situation can be queried, and the file system usage can be queried.
Linux system files, including folders, will have some permissions. These Linux perm
IPMI is an intelligent platform management interface. IPMI can be configured throug
Linux system is similar to Unix system. When there is still a big difference, users
When Ubuntu connects to the iPad, it reminds the iPad that it cant be charged. This
How to modify the app icon icon under Ubuntu Gnome
Ubuntu 13.10 tips for installing the latest Linux kernel
What should I do if hacmp fails to start after AIX is powered off?
How to install VPN in CentOS system
Linux installation g77 compiler skills
Detailed usage of nl commands under Linux
Introduction to the usr directory in Linux
Linux vim comment color can't see how to change?
RedHat software source prompt Unable to read consumer identity?
Linux uses vim for multiple file lookup and replacement methods
How to change the position of the close/maximize/minimize button in the Ubuntu program window
How to replace user avatar with Win10
How to turn off the sound of Win7 open folder
Clear the old system backup file in the system disk after Win8 upgrade
You have to know the seventy practical tips of Win7 (2)
Win7 system safari can not open the web page how to solve?
How does the Win7 system close the interactive service detection window?
Retrieving the language bar that Win7 disappears
Windows XP operating system shared Internet completely Raiders