Recursively Delete Files With Names Matching String
Posted on September 17th, 2010
by
tom
Share
I previously wrote about recursive grep.
Every now and then you need to delete files with a name that contains a string starting from the current directory and all files below. One way to do this on some Unix-like systems is to use something like...
find . -name \*.pyc -ok rm {} \;
The -ok will prompt you before deleting each file which is the safer but slower way to do it. If you're very sure about the file names you want to delete and don't want to be prompted then use -exec in place of -ok.
find . -name \*.pyc -exec rm {} \;
See also Recursively delete certain files.
(0)
Permalink
Tags:
*nix,
code,
file,
find,
match,
name,
recurse,
reference,
rm,
software,
unix-like
Recursive Grep
Posted on June 7th, 2010
by
tom
Share
Every now and then you need to know which files contain a string starting from the current directory and all files below. One way to do this on some Unix-like systems is to use something like...
find . -exec grep -l 'phrase to find in your files' {} \;
(0)
Permalink
Tags:
*nix,
code,
find,
grep,
recurse,
reference,
software,
unix-like
Captcha Links
Posted on January 25th, 2010
by
tom
Share
Some time ago I did some research on the use of Captchas for my previous hosting service. Just capturing some links here for future reference.
(0)
Permalink
Tags:
captcha,
implicit,
reference