-
Notifications
You must be signed in to change notification settings - Fork 0
/
Comandos_de_la_terminal%2Ffuser.mw
175 lines (147 loc) · 8.75 KB
/
Comandos_de_la_terminal%2Ffuser.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
__NOTOC__
* [[:#fuser | fuser]]
== fuser ==
<syntaxhighlight lang="bash">
[root@Llawyr ~]# fuser --help
fuser: Invalid option --help
Usage: fuser [-fMuvw] [-a|-s] [-4|-6] [-c|-m|-n SPACE] [-k [-i] [-SIGNAL]] NAME...
fuser -l
fuser -V
Show which processes use the named files, sockets, or filesystems.
-a,--all display unused files too
-i,--interactive ask before killing (ignored without -k)
-k,--kill kill processes accessing the named file
-l,--list-signals list available signal names
-m,--mount show all processes using the named filesystems or block device
-M,--ismountpoint fulfill request only if NAME is a mount point
-n,--namespace SPACE search in this name space (file, udp, or tcp)
-s,--silent silent operation
-SIGNAL send this signal instead of SIGKILL
-u,--user display user IDs
-v,--verbose verbose output
-w,--writeonly kill only processes with write access
-V,--version display version information
-4,--ipv4 search IPv4 sockets only
-6,--ipv6 search IPv6 sockets only
- reset options
udp/tcp names: [local_port][,[rmt_host][,[rmt_port]]]
[root@Llawyr ~]# fuser --version
fuser (PSmisc) 22.21
Copyright (C) 1993-2010 Werner Almesberger and Craig Small
PSmisc comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it under
the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING.
[root@Llawyr ~]#
[root@Llawyr ~]# rpm -qf $(which fuser )
psmisc-22.21-2.mga4
[root@Llawyr ~]# fuser $( which wpa_supplicant )
/usr/sbin/wpa_supplicant: 821e 1128e
[root@Llawyr ~]# ps aux | grep 821
root 821 0.0 0.0 31980 2024 ? Ss 17:01 0:00 /usr/sbin/wpa_supplicant -u -f /var/log/wpa_supplicant.log -c /etc/wpa_supplicant.conf -P /run/wpa_supplicant.pid
root 4504 0.0 0.0 15448 1000 pts/0 S+ 17:50 0:00 grep --color 821
[root@Llawyr ~]# ps aux | grep 1128
root 1128 0.0 0.0 32108 1340 ? Ss 17:01 0:00 /usr/sbin/wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant.conf -D wext
root 4527 0.0 0.0 15448 1000 pts/0 S+ 17:51 0:00 grep --color 1128
c current directory.
e executable being run.
f open file. f is omitted in default display mode.
F open file for writing. F is omitted in default display mode.
r root directory.
m mmap'ed file or shared library.
[root@Llawyr ~]# fuser /usr/lib64/libglib-2.0.so.0.3800.2
/usr/lib64/libglib-2.0.so.0.3800.2: 773m 826m 828m 830m 833m 890m 900m 1033m 1175m 1476m 1490m 1492m 1609m 1613m 1620m 1627m 1631m 1634m 1668m 1672m 1682m 1684m 1689m 1694m 1707m 1711m 1713m 1724m 1730m 1734m 1739m 1747m 1749m 1758m 1763m 1767m 1771m 1804m 1805m 1807m 1808m 1811m 1812m 1817m 1823m 1828m 1861m 1870m 1909m 3534m 3574m 3690m
root 4763 0.0 0.0 15444 1008 pts/0 S+ 17:55 0:00 grep --color 773|826|828|830
[root@Llawyr ~]# ps aux | grep -e "773|826|828|830"
root 4772 0.0 0.0 15444 1016 pts/0 S+ 17:56 0:00 grep --color -e 773|826|828|830
[root@Llawyr ~]# ps aux | grep 773
root 773 0.0 0.0 19316 1188 ? Ss 17:01 0:00 /usr/sbin/irqbalance --foreground
root 4781 0.0 0.0 15448 1000 pts/0 S+ 17:56 0:00 grep --color 773
[root@Llawyr ~]# fuser -u /usr/lib64/libglib-2.0.so.0.3800.2
/usr/lib64/libglib-2.0.so.0.3800.2: 773m(root) 826m(root) 828m(root) 830m(root) 833m(root) 890m(polkitd) 900m(root) 1033m(root) 1175m(colord) 1476m(root) 1490m(rrc) 1492m(rrc) 1609m(rrc) 1613m(rrc) 1620m(rrc) 1627m(rrc) 1631m(rrc) 1634m(rrc) 1668m(rrc) 1672m(rrc) 1682m(rrc) 1684m(rrc) 1689m(rrc) 1694m(rrc) 1707m(rrc) 1711m(rrc) 1713m(rrc) 1724m(rrc) 1730m(rrc) 1734m(rrc) 1739m(rrc) 1747m(rrc) 1749m(root) 1758m(rrc) 1763m(rrc) 1767m(rrc) 1771m(rrc) 1804m(rrc) 1805m(rrc) 1807m(rrc) 1808m(rrc) 1811m(rrc) 1812m(rrc) 1817m(rrc) 1823m(rrc) 1828m(rrc) 1861m(rrc) 1870m(rrc) 1909m(rrc) 3534m(rrc) 3574m(rrc) 3690m(rrc)
[root@Llawyr ~]# fuser -av /usr/lib64/libglib-2.0.so.0.3800.2
USER PID ACCESS COMMAND
/usr/lib64/libglib-2.0.so.0.3800.2:
root 773 ....m irqbalance
root 826 ....m upowerd
root 828 ....m udisks-daemon
root 830 ....m udisks-daemon
root 833 ....m gdm
polkitd 890 ....m polkitd
root 900 ....m gdm-simple-slav
root 1033 ....m accounts-daemon
colord 1175 ....m colord
root 1476 ....m gdm-session-wor
rrc 1490 ....m gnome-keyring-d
rrc 1492 ....m gnome-session
rrc 1609 ....m s2u
rrc 1613 ....m at-spi-bus-laun
rrc 1620 ....m at-spi2-registr
rrc 1627 ....m gvfsd
rrc 1631 ....m gvfsd-fuse
rrc 1634 ....m gnome-settings-
rrc 1668 ....m gsd-locate-poin
rrc 1672 ....m gsd-printer
rrc 1682 ....m gconf-helper
rrc 1684 ....m gconfd-2
rrc 1689 ....m gnome-shell
rrc 1694 ....m dconf-service
rrc 1707 ....m ibus-daemon-rea
rrc 1711 ....m ibus-dconf
rrc 1713 ....m ibus-x11
rrc 1724 ....m gnome-shell-cal
rrc 1730 ....m evolution-sourc
rrc 1734 ....m mission-control
rrc 1739 ....m goa-daemon
rrc 1747 ....m gvfs-udisks2-vo
root 1749 ....m udisksd
rrc 1758 ....m gvfs-afc-volume
rrc 1763 ....m gvfs-gphoto2-vo
rrc 1767 ....m gvfs-goa-volume
rrc 1771 ....m gvfs-mtp-volume
rrc 1804 ....m net_applet
rrc 1805 ....m evolution-alarm
rrc 1807 ....m pam-panel-icon
rrc 1808 ....m nm-applet
rrc 1811 ....m tracker-miner-f
rrc 1812 ....m applet.py
rrc 1817 ....m python
rrc 1823 ....m mgaapplet
rrc 1828 ....m tracker-store
rrc 1861 ....m evolution-calen
rrc 1870 ....m python
rrc 1909 ....m ibus-engine-sim
rrc 3534 ....m firefox
rrc 3574 ....m pxgsettings
rrc 3690 ....m gnome-terminal-
[root@Llawyr ~]# fuser -l
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@Llawyr ComandosDeLaTerminal]# fuser -auv ~rrc/ComandosDeLaTerminal/KillIt
USER PID ACCESS COMMAND
/home/rrc/ComandosDeLaTerminal/KillIt:
rrc 5201 f.... (rrc)KillIt
[root@Llawyr ComandosDeLaTerminal]# fuser -aukv ~rrc/ComandosDeLaTerminal/KillIt
USER PID ACCESS COMMAND
/home/rrc/ComandosDeLaTerminal/KillIt:
rrc 5201 f.... (rrc)KillIt
[root@Llawyr ComandosDeLaTerminal]# fuser -avuk -STOP ~rrc/ComandosDeLaTerminal/KillIt
USER PID ACCESS COMMAND
/home/rrc/ComandosDeLaTerminal/KillIt:
rrc 5330 f.... (rrc)KillIt
[root@Llawyr ComandosDeLaTerminal]# fuser -avuk -CONT ~rrc/ComandosDeLaTerminal/KillIt
USER PID ACCESS COMMAND
/home/rrc/ComandosDeLaTerminal/KillIt:
rrc 5330 f.... (rrc)KillIt
[root@Llawyr ComandosDeLaTerminal]# fuser -avuk -TERM ~rrc/ComandosDeLaTerminal/KillIt
USER PID ACCESS COMMAND
/home/rrc/ComandosDeLaTerminal/KillIt:
rrc 5330 f.... (rrc)KillIt
[root@Llawyr ComandosDeLaTerminal]# fuser -avuik -TERM ~rrc/ComandosDeLaTerminal/KillIt
USER PID ACCESS COMMAND
/home/rrc/ComandosDeLaTerminal/KillIt:
rrc 5446 f.... (rrc)KillIt
Kill process 5446 ? (y/N) y
</syntaxhighlight>
[[Category:Comandos de la terminal]]