initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / doc / Doxygen / tools / find-junkFiles
blob5b98d35195200e12647e2a49cf4fa5452666e1a0
1 #!/usr/bin/perl -w
2 use strict;
3 use File::Find ();
5 # -----------------------------------------------------------------------------
7 # Script
8 # find-junkFiles
10 # Description
11 # Search for "junk" files left over from editor, core, CVS, etc.
13 # - print filename only
15 # -----------------------------------------------------------------------------
17 sub wanted {
18 return unless -f $_;
20 if (
21 m{^\.?.+~$} ## editor backup
22 or m{^\#.+\#$} ## editor autosave
23 or m{^\.\#.+$} ## cvs replace update (eg, ".#test.c.1.3")
24 or m{^core(\.\d+)?$} ## core dump
25 ) {
26 print "$File::Find::name\n";
31 ## Traverse desired filesystems
32 for my $dir (@ARGV) {
33 no warnings 'File::Find';
34 warn "(**) checking '$dir' ...\n";
35 File::Find::find( { wanted => \&wanted }, $dir );