Distributed Networks Home
DBWebApplications eWebProgrammer
prev next prev next
  Course navigation
 
Lesson 2
Objective
The find command
Use find to identify files from within a script.
   
The find command locates files based on characteristics such as the file name or type of file. You can use find when you cannot remember where you stored a file.
The following displays the find command.
Unix Find Command
The –type and –user options
To locate a file by owner or file type, use the following command:
find /tmp -type f –user jane –print
Starting in the /tmp directory, this command searches for files that are type f (regular files as opposed to directory files) and owned by the user called jane. When the files are found they are printed onto the computer screen.
Here is a review of some common file types.
The next lesson shows how to use the wc command to count the words, lines, and characters in a file.
  Course navigation