Deleting Specific Files
If you use gcc or g++, try cleaning up all your a.out and core files by entering the following commands, which will prompt you for each file they find, and ask whether or not you want to remove them. Make sure you know what you’re deleting before you say yes (and that you really don’t need it)!
~/ > find $home -name a.out –exec rm -i {} \; ~/ > find $home -name out -exec rm -i {} \;
You can change the name of the file in the command to search for any filename in your home directory, just replace with the name of the file you want to search for, and be prompted to delete:
~/ > find $home -name -exec rm -i {} \;
Deleting Old Files
Try finding files that are very old. The following command will find all files older than 183 days, and prompt you to remove each file, but be especially sure that you know what you’re deleting when doing this:
~/ > find $home -mtime +183 -exec rm -i {} \;
You can simply get a list of all of the old files by typing:
~/ > find $home -mtime +183
You can change the time period you search for by altering the number you enter after the + i.e., for files modified within the last 100 days enter:
~/ > find $home -mtime +100
Then, if you are sure that you want to delete ALL of these files, you can change the -i to a -f, which will automatically delete the files (be VERY sure you really want to delete the files before you do this):
~/ > find $home -mtime +183 -exec rm -f {} \;
Deleting Large Files
Try finding files that are very large, for example you can find all files larger than 1MB and be prompted to delete each one by entering:
~/ > find $home -size +1048576c -exec rm -i {} \;
The +1048576c means more than 1,048,576 Bytes. You can modify the number to find files of different sizes, but don’t forget the c.
Deleting E-Mail
Be sure to check through all of your e-mail folders, including the archived saved-messages folders, which are automatically created by pine. Be on the lookout for mail that contains large attachments which you no longer need, or which you already have a copy of.
To open folders other than your inbox, from the main menu of PINE, press L, then select Mail. This will give you a list of all the folders you have. Check every folder, and verify that it doesn’t contain items you don’t need.
To help find larger e-mail messages using PINE, you can sort the current folder you’re in by typing $ for sort, then Z to sort by size. This will allow you to see the largest messages more easily.