UGU Unix Guru Universe
For Unix Admins, By Unix Admins
Follow ugucom on Twitter      Search  in 
Home
BEGINNERS & USERS

Events

Internet
 
 Linux
BEGINNERS & USERS
Software
Linux Vendors
Usenet NewsGroups
Books & Publications
 
 Shop
Cool Admin Gifts!
Gadgets
T-Shirts
Books
 
 Unix Guru Universe
About
Add Link
Feedback
 
 
UGU: Unix Guru Universe - Unix Tip #4640- November 23, 2024 - Home : Help : Today's Tip
Unix Tip #4640- November 23, 2024

CLEANING DIRECTORIES


The creation of many temporary files
in Unix during compilations, occupies
a lot of memory space. This can be
got rid of by using a simple script.

find $1 \( -name a.out -o -name '*.o' -o -name 'core' -o -name '*.ii' -o -name '*.ti' -o -name '*.class' -o -name '*.pur' \) -exec rm {} \;

Save the above line in a file and run
this file after changing permissions.
For example, if the file containing
the above code has the name 'clean',
then:

example% clean

will remove all the files specified
in the script in the directory and
all other subdirectories within it.
You can add or remove any number of
files in the script, to suit your
needs.

This tip generously supported by: vmanand@hotmail.com

NOTE: All tips provided are USE AT YOUR OWN RISK. Tips are submitted by various unix admins around the globe. UGU suggest you read and test each tip in a non-volitile environment before placing into production.


LAST 5 TIPS
4639 - REMOVING BLANK LINES
4638 - SORT BY FILE SIZE
4637 - ZERO THOSE LOG FILES
4636 - REBOOTING BECAUSE OF FORK BOMBS
4635 - WHAT TIME IS IT REMOTELY?


I want to SUBSCRIBE and get a UGU Tip everyday.
I want to UNSUBSCRIBE and NOT get a UGU Tip everyday.

If you have a UNIX TIP let us know, we just may use it:
(All tips become the property of the Unix Guru Universe)
Email Address:

Yes, email me a Hot Unix Tip everday.

Enter Hot Unix Tip (optional):

Yes, I will support this tip

Captcha (not case sensitive):


Please enter the above letters:

 
Copyright 1994-2024 Unix Guru Universe