summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
Diffstat (limited to 'move')
-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'));