Friday, June 9, 2017

Linux - find command

This command will search for all file type with a case insensitive ending of .conf.
find . -type f -iname "*.conf"

This will do the same search however only in the current directory, means it will not recurse through the directory.
find . -maxdepth 1 -type f -iname "*.conf"

This search will search for all file over 50 Kilobytes.  If we replace k with M we get megabytes I suppose (Would it kill you to look up the man page yourself ?).
find . -maxdepth 1 -type f -iname "*.conf" -size +50k

No comments:

Post a Comment