#!/bin/bash GLOBIGNORE=. ( for i in *; do a=$(find "./$i" -xdev | wc -l) printf "%s" "${a%\n}" printf " - %s\n" "$i" done ) | sort -n