DistributedNetworks DistributedNetworks


Host Security  «Prev 

Linux Find command

The format of the find command is:
find path pattern
If you do not specify a path, find starts in the current working directory and looks through all subdirectories for the specified pattern.
The find command has many options that you can review by entering man find at a shell prompt. The most common option is -name, which tells find to search for all files and directories with a certain string of letters in their name.
find . -name foo
 
The above command searches through the current working directory for all files with "foo" in their name.
Finding modified and sticky files 1

  1. find command
  2. /etc: These are the user specified paths that will be searched for modified files
  3. -mtime: As an option that locates all files modified within a user-specified number of days
  4. -l : The number of days as specified by the user
  5. -ls :An option requesting a list containing additional information about modified files
  6. /etc/passwd: This output displays all the files under the /etc directory that have been modified in the past 24 hours