summaryrefslogtreecommitdiffstats
path: root/move/tools
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-10-30 16:08:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-10-30 16:08:54 +0000
commit631717f6192097f68b0bcc238edac862c3439622 (patch)
treec53f7c88c85ba26db4c9f66fbe74d7c2de62b737 /move/tools
parentb2343e892c52286c4f363563d1d2164da03dfc62 (diff)
downloaddrakx-631717f6192097f68b0bcc238edac862c3439622.tar
drakx-631717f6192097f68b0bcc238edac862c3439622.tar.gz
drakx-631717f6192097f68b0bcc238edac862c3439622.tar.bz2
drakx-631717f6192097f68b0bcc238edac862c3439622.tar.xz
drakx-631717f6192097f68b0bcc238edac862c3439622.zip
list currently busy files
Diffstat (limited to 'move/tools')
-rwxr-xr-xmove/tools/busy-files9
1 files changed, 9 insertions, 0 deletions
diff --git a/move/tools/busy-files b/move/tools/busy-files
new file mode 100755
index 000000000..476a2dc67
--- /dev/null
+++ b/move/tools/busy-files
@@ -0,0 +1,9 @@
+#!/usr/bin/perl
+
+use MDK::Common;
+
+print "$_\n" foreach uniq (map {
+ grep {
+ $_ && !m!^(/proc/|/dev/|pipe:|socket:)!;
+ } map { readlink($_) } "/proc/$_/exe", glob_("/proc/$_/fd/*");
+} grep { $_ ne $$ && /^(\d+)$/ } all('/proc'));