-
-
Save smw/a21a9f675ed3358830da to your computer and use it in GitHub Desktop.
Pop this somewhere in your path. Finds files/directories/links, with globbing.
This file contains hidden or 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
#!/usr/bin/perl -w | |
if (@ARGV < 1) { | |
print "Usage: mdf <file glob to search for>\n"; | |
exit(1); | |
} | |
my $nameGlob = shift @ARGV; | |
exec ('mdfind', qq(kMDItemFSName=='${nameGlob}'c), @ARGV) or | |
print $STDERR "Couldn't find mdfind: $!"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment