Stanford University School of Earth Science
 
Home
News
New Users
Policies
Email
Web Hosting
Get Help
Net Connections
Macintosh
Windows PC
Unix/Linux System
Pangea Server
   Use Policy
   Account Info
   Account Mgt
   Passwords
   Logging In
   Email Services
   Posting Events
   Web Hosting
   File Storage
   File Transfer
   Printing
   FAQ
School Resources
Using Unix

How to find your disk space usage

Last revision January 18, 2006

Determine how much disk space (in Kilobytes) you are using in your pangea home and aufs (Macintosh) directories by running these commands from a command shell login:

du -sk $HOME
du -sk $AUFS

There are 1024 Kilobytes per Megabyte. Dividing the results of the du command by 1000 gives the approximate number of Megabytes. You can also use du to show total disk usage for any directory on pangea, such as a subdirectory of your home directory. Just give that directory name as the argument to the command, for example:

du -sk subdir_name

Finally, you can see the sizes of the individual files within a directory using the normal UNIX ls command with the -l option. For example,

ls -l

lists all the files in the current directory, and

ls -l subdir_name

lists all the files in the sub-directory named subdir_name. This list includes the size of each file in bytes as the fifth "field" on the output line. There are 1,048,576 bytes in a Megabyte. Divide size in bytes by one million to get approximate Megabytes.

You can also see how much disk space is available and used for the entire disks on pangea, not just your own home directory, by running this command:

df -k

The results are in units of Kilobytes.

 


Comments?

Stanford University    |