Mac Security

Find all files with a single character name

Other than typesetting and indexing tools, most apps shouldn’t be creating files that have single character file names. To find all the files with single character file names on a Mac, you could use find and then awk for the length of the file name:

find / -type f -print| awk -F/ ' length($NF)  == 1 '

You could also use mdfind or another tool to list all files and pipe that to the same awk -F/ ‘ length($NF)  == 1 ‘ statement.