Skip to content

Viewing Usage

Check how much space you are using before a volume fills up. A full home directory is one of the most common reasons jobs fail. The commands below work from a login node or a job, and each section shows sample output.

Location Total usage
Home directory df -h /hpc/home/$USER
Group storage df -h /hpc/group/<groupname>
/work quota -s -f /work
Data Commons df -h /datacommons/<groupname>

To see which files and folders are taking the space in any of these locations, see Finding what is using space.

Home directory

See your total usage against the 25 GB home quota,

df -h /hpc/home/$USER

E.g.,

$ df -h /hpc/home/$USER
Filesystem                                               Size  Used Avail Use% Mounted on
oit-nas-fe13.dscr.duke.local:/ifs/oit-nas-fe13/hpc-home   25G   15G   11G  59% /hpc/home

Size is your quota and Used is how much of it you have used. This is the number that matters when your home directory fills up.

Group storage

Show the size of your group's volume and how much of it is used,

df -h /hpc/group/<groupname>
$ df -h /hpc/group/rescomp
Filesystem                                 Size  Used Avail Use% Mounted on
oit-nas-fe13.dscr.duke.local:/hpc-rescomp  1.0T  390G  635G  39% /hpc/group/rescomp

/work

Show how much space you are using on /work,

quota -s -f /work
$ quota -s -f /work
Disk quotas for user ukh (uid 1494086):
     Filesystem   space   quota   limit   grace   files   quota   limit   grace
vast.oit-vast-01.oit.duke.edu:/vwork
                   112G      0K  20480G           22677       0       0

space is how much you are using (112 GB here), limit is your hard limit (20480G, or 20 TB), and files is how many files you have. df -h /work shows the whole shared volume instead, so use quota for your own numbers. If quota also prints a Cannot statfs() warning about another mount, you can ignore it. Remember that files on /work older than 75 days are purged automatically.

Data Commons

Show the size of your group's Data Commons volume and how much of it is used,

df -h /datacommons/<groupname>
$ df -h /datacommons/plusds
Filesystem                                              Size  Used Avail Use% Mounted on
oit-nas-fe13dc.dscr.duke.local:/ifs/datacommons/plusds   12T   12T  716G  95% /datacommons/plusds

Finding what is using space

du lists the size of each file and folder inside a directory, which shows you what to clean up. It works the same way in your home directory, group storage, /work, and Data Commons. Run it on the directory you want to inspect, largest items last,

du -hd1 --apparent-size <directory> | sort -h

For example,

du -hd1 --apparent-size /hpc/home/$USER | sort -h
du -hd1 --apparent-size /hpc/group/<groupname> | sort -h
du -hd1 --apparent-size /work/$USER | sort -h
du -hd1 --apparent-size /datacommons/<groupname> | sort -h
$ du -hd1 --apparent-size /hpc/home/$USER | sort -h
...
1.2G    /hpc/home/ukh/.bun
1.5G    /hpc/home/ukh/.MathWorks
1.6G    /hpc/home/ukh/.nvm
2.0G    /hpc/home/ukh/.npm
2.3G    /hpc/home/ukh/libs
2.6G    /hpc/home/ukh/.local
3.7G    /hpc/home/ukh/.vscode-server
19G     /hpc/home/ukh

-d1 shows one level of folders. Run du again on a large folder to look inside it, and add -a to include individual files. The last line is the total. --apparent-size adds up the actual file sizes, which is close to what your quota counts. Without it, du counts disk blocks and can report noticeably more than df or quota shows. In home directories, hidden folders such as .local, .npm, .conda, and .vscode-server often take more space than expected.

On large directories du can take several minutes. Run it in an interactive session rather than on a login node.