Skip to content

Instantly share code, notes, and snippets.

@masiuchi
Last active May 24, 2018 08:32
Show Gist options
  • Save masiuchi/f87e2e297e172fa06d30ff7095685bfa to your computer and use it in GitHub Desktop.
Save masiuchi/f87e2e297e172fa06d30ff7095685bfa to your computer and use it in GitHub Desktop.
#/bin/sh
find / -ls 2>/dev/null | perl -pe 'my @fields = split /\s+/, $_; my ($uid, $gid, $file) = @fields[4,5,10]; if (($uid =~ /^\d+$/ && $uid > 65535) || ($gid =~ /^\d+$/ && $gid > 65535)) { $_ = "$uid $gid $file\n" } else { $_ = "" }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment