Using find(1) to recursively clean LaTeX compiles

I keep all of my resumes with this sort of directory structure:
resumes/2009/company/resume.tex (along with cover.tex for cover letters, and whatnot)

Now it’s all under SVN so I only have the *.tex sources under revision control. But when there are a billion compiled DVIs/PSs/PDFs/etc, it’s a little annoying to look at a really long “svn status” command.

So.. I delete them all!
find . \( -name "*.dvi" -o -name "*.ps" -o -name "*.pdf" -o -name "*.aux" -o -name "*.log" \) -type f -print -delete

Using find(1) I can find files. I match for outputs ORed with each other and delete them (print for confirmation). This isn’t exactly the best way (ORing specific filetypes), but it works for what I’m doing for now.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: