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.

 

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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