Last active
May 24, 2018 08:32
-
-
Save masiuchi/f87e2e297e172fa06d30ff7095685bfa to your computer and use it in GitHub Desktop.
Find high uid/pid files. (https://circleci.com/docs/2.0/high-uid-error/)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/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