On Thu, 1 Nov 2007, Michael G Schwern wrote:

> I want to delete a bunch of unnecessary text files in a pile of NOVA episodes
> I have archived.  Ok, no problem...

Anything beyond rudimentary find has always scared me into laziness. 

If the .txt files are all known to be at the same depth, why not just:

    $ cd ~/Movies/NOVA
    $ find . | grep '\.txt$'  # just to skim the list & be sure...
    $ rm */*/*.txt

Hm? 

Then repeat the `find . | grep ...` to verify you got them all. 

If there's some another level down, no problem:

    $ rm */*/*/*.txt

Et voila. 

I know find is powerful enough to blow my foot off, so I try not to 
point it that way to begin with. 



-- 
Chris Devers

Reply via email to