Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Using Find with Regular Expressions.
March 6, 2008, 8:14 pm
rate this thread
Re: [OT] Using Find with Regular Expressions.
This is off-topic in a PHP newsgroup. Personally, I'd just pipe the output
from "find" through "grep -v".
Why not just cd to the directory and "rm -f *"? Without the "-r", "rm"
doesn't recurse into directories.
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 22.214.171.124-mm-desktop-9mdvsmp, up 37 days, 17:56.]
[Now Playing: Billy Joel - Captain Jack]
Re: Using Find with Regular Expressions.
Let's say there are 50 files and 50 directories, but I only want to
keep 3 or 4 directory and 1 file, now I can do rm -rf to each file and
directory, but I'm looking for a way to more automate this process.
I think applying the +i directory attribute is a solution that works