summaryrefslogtreecommitdiffstats
path: root/move/tools/busy-files
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/busy-files
parentb2343e892c52286c4f363563d1d2164da03dfc62 (diff)
downloaddrakx-backup-do-not-use-631717f6192097f68b0bcc238edac862c3439622.tar
drakx-backup-do-not-use-631717f6192097f68b0bcc238edac862c3439622.tar.gz
drakx-backup-do-not-use-631717f6192097f68b0bcc238edac862c3439622.tar.bz2
drakx-backup-do-not-use-631717f6192097f68b0bcc238edac862c3439622.tar.xz
drakx-backup-do-not-use-631717f6192097f68b0bcc238edac862c3439622.zip
list currently busy files
Diffstat (limited to 'move/tools/busy-files')
-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'));