

js (JavaScript files).įinding files by name is probably the most common use of the find command. The (expression) -name "*.js tells find to search files ending with.The /var/www (path…) specifies the directory that will be searched.The option -L (options) tells the find command to follow symbolic links.

Let’s take a look at the following example: find -L /var/www -name "*.js" To search for files in a directory, the user invoking the find command needs to have read permissions on that directory. The expression attribute is made up of options, search patterns, and actions separated by operators.attribute defines the starting directory or directories where find will search the files. The options attribute controls the treatment of the symbolic links, debugging options, and optimization method.
