Fun with find

# find all .html files in the current directory and sub directories
find . -name "*.html" -type f -print

# find all "dot" directories
find /Users/smbrown -name ".*" -type d -print

# find all "dot" files
find /Users/smbrown -name ".*" -type f -print

# find all dot files, but omit the pesky OS X .DS_Store files
find . -name ".*" -type f ! -name ".DS_Store"
# find all the .mp3 files in the cwd and copy them to a folder on the desktop named iPod
find . -name "*.m*" -type f -exec cp '{}' ~/Desktop/iPod/ \;

Advertisements

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 )

Google+ photo

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

Connecting to %s