This is a handy method to find files to reduce the size of a file system in either linux or solaris.
- Log onto the system in question and go to the file directory in question.
- run ‘du -sk’
- If a mail directory like someone’s home directory: find the Trash and copy /dev/null to empty the folder. sudo find . -name Trash -exec cp /dev/null {} “;”
- Find core files. Core files are left over from programs that terminate prematurely. If your organization analyzes the files then move them to another location, other wise remove the files.
- If your Linux/Solaris environment is heterogeneous with Windows, you should find and remove: Thumbs.db, thumbs.db and desktop.ini.
- Next find the largest files: sudo find . -size +10204 -exec ls -ald {} “;” and have the owner move or delete the files.
- Find old directories and gzip them. Gzip has a better compression ratio than zip. Note: if the file system is already reaching maximum capacity this will not work because gzip does not remove the files.
- Always use the find command and perform a listing of what you are looking for in the directory. You do not want to remove a file that is needed by a developer or the system itself.
Does anyone have any more suggestions for reducing the size of a directory other than growing the file system?
Mike Kniaziewicz