summaryrefslogtreecommitdiffstats
path: root/find-inodes
diff options
context:
space:
mode:
Diffstat (limited to 'find-inodes')
-rwxr-xr-xfind-inodes10
1 files changed, 8 insertions, 2 deletions
diff --git a/find-inodes b/find-inodes
index afb5e26..111c64e 100755
--- a/find-inodes
+++ b/find-inodes
@@ -1,3 +1,9 @@
-#!/bin/sh
+#!/bin/bash
GLOBIGNORE=.
-(for i in *; do echo -n "$i: "; find "$i" -xdev | wc -l; done) | sort -nk2
+(
+for i in *; do
+ a=$(find "$i" -xdev | wc -l)
+ printf "%s" "${a%\n}"
+ printf " - %s\n" "$i"
+done
+) | sort -n