At IU, in Unix, how can I make better use of my disk space?
On this page:
- Delete backup and temporary files
- Store temporary files elsewhere
- Compress files
- Store unused files elsewhere
To effectively manage your disk space at Indiana University, you need first to determine the size of your disk space and how much of it you have used. On a Unix computer, to see how much disk space you are using and how much you are allowed to use, from the Unix shell prompt, enter:quota -v
To see how much space each file on your account takes, enter:ls -alR ~/
The command above shows a listing of all files in your account, including
those in subdirectories. If you have many files and subdirectories, the
output may be very long. To read it in page-sized chunks, use the
pipe command to format it:
See the following examples for ways to maximize storage on your Unix account without a space increase.
Delete backup and temporary files
Delete backup and temporary files of the form
#filename# by entering:
Note: With some shells, you need to escape
# (pound sign) character with a
\ (backslash) character, since otherwise the
shell would treat the rest of the line as a comment.
Store temporary files elsewhere
Put temporary files in the directories
you are using them (where
username is your
Some systems may not have
directories, or you may have to create your own subdirectory in
/scratch. Files in these
directories are periodically erased and are not counted against your
space. For information about scratch space on IU's research systems,
see At IU, how much disk space is available to me on the research systems?
Compress files using one of several Unix compression programs. To
compress a file named
bigstuff with the Unix
gzip command, at the Unix prompt, enter:
The file will be replaced in your directory with a compressed file
that has a
.gz extension. You can't read files or run
programs while they are in compressed format, so this command is most
useful for storing things you want to keep but won't need to use soon.
To expand the file back to its original state, enter:
For more information about Unix compression utilities, see the online manual pages. At the Unix prompt, enter any of the following:man gzip man tar man zip man compress
Store unused files elsewhere
Download some of the files you are not using to a Windows or Macintosh computer and save them on the hard drive or a removable disk.
At Indiana University, for personal or departmental Linux or Unix systems support, see At IU, how do I get support for Linux or Unix?
Last modified on May 17, 2011.