With zsh it is very simple, as that shell uses recursive globbing:

#!/bin/zsh
/bin/rm -rf   **/coot-backup

You can also use the unix "find" command to do this kind of thing (or mdfind on OS X, which is much faster, or various version of locate).


William G. Scott

Contact info:
http://chemistry.ucsc.edu/~wgscott/


On Apr 24, 2009, at 8:51 AM, Simon Kolstoe wrote:

Dear Cootbb,

As I am a crystallographer and not a programmer, could anyone suggest a bash script that will go through my hard drive deleting all the pesky "coot-backup" directories with their horribly long file names that zipping software cannot cope with? Also, in a future version of coot, would it be possible to change the names of the coot-backup files to something simpler e.g. just date and time (for instance something like 240409-1650.pdb)?

Thanks,

Simon

Reply via email to