du -s ~The number that is printed is the amount of space in your home directory measured in kilobytes.
du" is the most useful command for showing you what directories contain the most space. For example:
hamilton ~% du 16 ./VILEARN 48 ./Mail/inbox 842 ./Mail 4 ./.nn 5 ./.pgp 2 ./www 1952 ./mail 142 ./.netscape 3849 hamilton ~%This gives you a breakdown of how much space is used by each directory. The above output indicates that there is approx 3.8Mb in the account, most of which is in the 'mail' and 'Mail' directories. For a graphical display of this information you can try:
du | xdu
ls -la | sort -n +4
ls -la www | sort -n +4' will work.
find ~/Mail -name "[,#]*" | xargs rm
elm -f +received
mutt -f +received
rm -r nsmail
elm -f mbox
mutt -f mbox
rm. With its
-roption it will remove whole directories.
-imakes it ask for confirmation before deleting each file. For example:
rm -ir wwwYou can also use shell meta or wildcard characters, e.g.:
gzip results.psTo uncompress a single file:
gunzip results.ps.gzYou can also compress entire directories. Make sure to remove junk from them first, and to delete the directory after it is compressed.
project is directory containing C code, Makefiles, data etc,
tar -zcf project.tar.gz projectcheck to make sure it worked
tar -ztf project.tar.gzremove the original
rm -rf projectTo uncompress the directory:
tar -zxf project.tar.gz