Checking Storage Usage on Monsoon
Reaching storage capacity is a common issue for users. In your /home directory you’ll have about 10GB of storage capacity. Any large data files or programs should be put in your /scratch directory.
Checking storage quota
The command that will be most useful for you is getquotas.
[abc123@wind ~ ]$ getquotas
Filesystem #Bytes Quota % | #Files Quota %
/home 5503M 10000M 55% | - - -
/scratch 184.3G 13.97T 1% | 310K 2M 15%
[abc123@wind ~ ]$
The #Bytes column shows your storage usage and the Quota column shows your storage capacity. Your /home directory will have far less storage than your personal /scratch directory or that of any /projects directories you have. Avoid putting large data files or programs in /home, because it will fill up quickly.
The quota command will also tell you how much storage is used and available for your /home.
Clearing up space
When you are trying to free up space, you can use the du or find commands to identify large files you want to delete.
Here’s a du command example that will output in sorted order the largest files in your /home (largest files will be at the bottom of the output stream):
du -h --apparent-size --max-depth=1 ~/ | sort -h
This is another example, this time using the find command, to identify files larger than 1GB:
find ~/ -type f -size +1G | xargs -d '\n' du -h
Run the above command(s) in the directory where you are at or near capacity.
Once you find the files/directories you want to remove you can use the rm command.
Disclaimer: The rm command is destructive. It will not keep a copy in a Trash directory like it would on a windows desktop. Once you run rm you will not be able to recover your data.
If you have files that you want to move to another directory, run cp to copy over to the new location, and then run rm to remove your original copy.
The rm and cp commands need the -r flag if you are working with directories. This will tell the program to recursively remove or copy, the contents of the directory.
Learn More
If you have any questions feel free to contact us. We have more online resources on our documentation page.