Keeping the Directories Orderly
Finding the large directories
- files/directories: du -sk * | sort -n biggest at bottom
- MB files/directories: du -sh * | grep M | sort -n
- .dot files/directories: du -sk .[a-zA-Z]* | sort -n
Basic Rules
- Root directory (~) should have only directories and dot files.
- Any directory with more than 30 items should be split into
subdirectories
- A well-planned root structure will last forever
- Avoid use of all caps files or directory names. A single capital at
start of name will list it near the top. If needed, a single number
at start of name will it even nearer the top.
Cleaning the disk
- Clean directories for your benefit. JWW will provoke
"hogs" to clean up. Keeping only what you need make it easier to
find.
- Clean up a file when job is finished. Good Makefile has clean entry.
- Remove all files trivially re-generated:
- no TeX/LaTeX
file except .tex and .ps(.eps);
- no codes except .c/.cpp/.f/.h
and executable. If in active file development, might keep reusable .o's;
- A good Makefile will allow easy removal. [Use clean for routine
cleanup and cleanall to save only source and executable.]
- A script can recursively do this. Try writing one or asking someone.
Never filling /n/home00 in the first place
Do large runs from one of the disk2 on bali, iona, oahu, wright.
The output will stay there. The few numbers worth saving can move to /n/home00.
Mail Files
The biggest single junk store is Mail files; suggestions adapted from Bryan Dunlap
- Most files over 3 months are not used. Certainly over a year.
- Remove attachment from email files once attachment has been saved.
- After 3 months or a year, put older material on CDROM. They can
always be referred to; typically few times a year.
- Organize mail into folders; big folders into subfolders (use 30-40
as guide). Most modern mail system can search in that structure.
Shorter lists of mail files in a folder makes it easier to use.
Your comments and
suggestions are appreciated.
To cite this page:
Keeping the Directories Orderly
<http://www.physics.ohio-state.edu/~wilkins/group/local/cleandir.html>
[Friday, 25-May-2012 18:36:53 EDT]
Edited by: wilkins@mps.ohio-state.edu on
Friday, 16-Jul-2010 08:51:11 EDT