Psst… got an a.out problem?

My system is full of a.out files. Leftovers from compiling my own C and Fortran programs, or evaluating others. This is a case where physically going through each folder and deleting them, or doing the same via command-line makes me feel nauseous. As I know they are restricted to certain parts of the disk, how do I go about deleting them all? One way would be to create a shell script. The easiest way is to use find.

First check the files:

find . -name "a.out" -type f

Then the files can be deleted in the following manner:

find . -name "a.out" -type f -delete

This will recursively delete all a.out files from the current directory down.



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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.