I came across a command in Bash script in which I found:find /var/log/abcd -type fThe above command was in context of cleaning the log files.I know what find does.After having seen -type f, I looked manual page for it.I got to see it in man page of BASH_BUILTINS(1)The description of -f flag under type command is :-The -f option suppresses shell function lookup, as with the command builtin.Following are my questions:What is the use of type ?What is the significance of -f flag?What is the use of using type with find command? [EDIT]:- After having read all the comments and answers till now, I would like to mention the cause for my misinterpretation of -type option in command find Vs type command .This all happened because I was assuming and till date have seen only the short options(Tests in case of the find command) with a single minus sign '-', example, ls -l. Most of the times I have seen long options with double minus sign '--' , example, ls --version.
Bash: What is the use of type (Bash builtins)?
bash;bash script
In this case type has nothing to do with the bash built-in type, but more on that later on.A little about typeThe BASH built-in type command gives you information about commands. Thus:$ type typetype is a shell builtinThe syntax is:type [-tap] [name ...]-t: print only type, if found-a: print all occurrences of the command, both built-in and other.-p: print the disk file that would be executed on call to command, or nothing.If we look at time, kill and cat as an example:$ type time kill cattime is a shell keywordkill is a shell builtincat is /bin/cat$ type -t time kill catkeywordbuiltinfile$ type -a time kill cattime is a shell keywordtime is /usr/bin/timekill is a shell builtinkill is /bin/killcat is /bin/cat$ type -ta time kill catkeywordfilebuiltinfilefileNow, this specify that if you are in a Bash shell and type time some_cmd, the bash builtin time is used. To use the system time you can do /usr/bin/time some_cmd.One way often used to ensure that the system, and not built-in, command is used is by using which.tt=$(which time)and then use $tt to call system time.The command in questionIn this case the -type is an option to the command find. The option takes one argument of by which specify the type of entity. Examplefind . -type f  # Filefind . -type d  # DirectoryThere are more, check man find for the rest.To search for the specific option you can do (whilst in man):/^\s*-typeEnterThen use n for next until you find it.A little about shell commandThis is a bit of a personal interpretation.Some of the things worth mentioning, in this specific case, are commands, options, arguments and pipes.This is somewhat loosely used, but in my vocabulary we have in short:command: a program or built-in.parameter: an entity after the command word.option: an optional parameter.argument: a required parameter.In a command specification square brackets are used to specify options and, optionally less/greater then, used to specify arguments. Thus:foo [-abs] [-t <bar>] <file> ...foo [-abs] [-t bar] file ...Gives -a -b and -s as optional parameters, and file a required one.-t is optional, but if specified takes the required argument bar. Dots represent that it can take several files.This is no exact specification, and often man or help is required to be sure.Positioning of arguments options and input can often be mixed up, but it is generally best to keep to a position based approach as some systems does not handle mixed positioning of arguments. As an example:chmod -R nick 722 foochmod nick 722 foo -RBoth work on some systems, whilst the latter does not on other.In your exact command all parameters belongs to find  thus if you wonder about a property man find is the correct place to look. In cases where you need to look at man pages for the shell etc. could be in e.g.:find . $(some command)find . `some command`find . $some_varfind . -type f -exec some_command {} \;find . -type f | some_command...The -exec is a special one where -execsome_command{}\; are all parameters given to find, but the some_command{}\; part is expanded, within find to some_commandstring_of_found_entity.Further onquotingexpansioncommand substitutionand so much moreYou might find this useful.