Posted By

therobot on 12/19/07


Tagged

commands find


Versions (?)


Advertising

Website Promotion DIRECTORY is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


Who likes this?

2 people have marked this snippet as a favorite

willcodeforfood
moonbather


deleting files of certain types from the command line


Published in: Bash 






URL: http://snipplr.com/view/4363/howto-find-files-on-your-computer-with-find/

Expand | Embed | Plain Text
  1. find samba/ -iname '*.mpg' -o -iname '*.avi' -o -iname '*.mov' -o -iname '*.mpeg' -o -iname '*.wmv' -exec rm -f '{}' \;

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: therobot on December 20, 2007

Also, for skipping spaces in path names:

find samba/ -iname '.avi' -o -iname '.mpg' -o -iname '.mov' -o -iname '.wma' -o -iname '.wmv' -o -iname '.mpeg' | while read filename; do rm -f "$filename"; done

You need to login to post a comment.

Download royalty free graphics