find

  • Figure out where you put your files
    • find start options
  • find . -name pattern -print
  • Lists all files that match the pattern in the current directory or any sub-directories
  • The pattern should be in quotes to prevent the shell from using globbing in the current directory.
  • -print is a default action so it can be omitted if there is no other action.
  • find . -name "*.exe" -print -delete
  • Lists and deletes all files ending in .exe in the current directory and sub-directories.
  • Avoid using find on the root directory on a shared machine.
Advertisement

There are no comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.