Find Command

  • search files and display the full path
  • execute command on search results
  • Different search criteria
    • name
    • part name
    • ownership
    • owning group
    • permissions
    • inode number
    • last access
    • modification time in days or minutes
    • size
    • file type
  • Command syntax
    • {find} + {path} + {search option} + {action}
  • Options
    • -name / -iname (search by name)
    • -user / -group (UID / GID)
    • -perm (permissions)
    • -inum (inode)
    • -atime/amin (access time)
    • -mtime/amin (modification time)
    • -size / -type (size / type)
  • Action
    • copy, erase, rename, change ownership, modify permissions
      • -exec {} \;
        • replaces {} for each filename as it is found. The semicolon character (;) marks the termination of the command and it is escaped with the backslash character (\).
      • -ok {} \;
        • same as exec but requires confirmation.
    • -delete
    • -print <- default