Find (Unix)
Find (Unix)
Main page

Find (Unix)

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
Find (Unix)

find is a shell command that locates files based on search criteria and performs actions on the matching files such as printing the file system path to the standard output. It starts searching at a directory in a hierarchical structure and recursively traverses the tree although can be limited to a maximum number of levels. Commonly used search criteria include file name pattern matching, file type matching, and time range matching for last modification or last access. With no arguments, the command outputs the path of each file in the tree rooted at the working directory. The command can search through different file systems of partitions belonging to one or more storage devices mounted under the starting directory. The command is available on most Unix-like systems.

The command first appeared in Version 5 Unix as part of the Programmer's Workbench project, and was written by Dick Haight alongside cpio, which were designed to be used together.

The GNU implementation was originally written by Eric Decker. It was later enhanced by David MacKenzie, Jay Plett, and Tim Wood. The GNU implementation provides features beyond the POSIX specification.

The command was ported to the IBM i operating system.

The BusyBox computer program provides the find command and many other commands in a single executable file.

The syntax of the command can be described as:

Traditionally, at least one path must precede the expression, but newer versions allow for no path argument, defaulting to the working directory.

The expression can specify various aspects including match criteria and actions to perform on matched files. Expression elements are separated by whitespace and are evaluated left-to-right. The command can match via wildcard characters but wildcard match text must be quoted to prevent shell globbing. If the expression is omitted, then all files are matched.

See all
User Avatar
No comments yet.