The output is similar to the Unix df command.

ps_disk_usage(paths = ps_disk_partitions()$mountpoint)

Arguments

paths

The mounted file systems to list. By default all file systems returned by ps_disk_partitions() is listed.

Value

A data frame with columns mountpoint, total, used, available and capacity.

Details

Note that on Unix a small percentage of the disk space (5% typically) is reserved for the superuser. ps_disk_usage() returns the space available to the calling user.

See also

Other disk functions: ps_disk_io_counters(), ps_disk_partitions()

Examples

ps_disk_usage()
#> # A data frame: 14 × 5
#>    mountpoint                          total        used   available capacity
#>    <chr>                               <dbl>       <dbl>       <dbl>    <dbl>
#>  1 /                            102888095744 73947607040 28957265920   0.719 
#>  2 /snap/amazon-ssm-agent/11320     28573696    28573696           0   1     
#>  3 /snap/bare/5                       131072      131072           0   1     
#>  4 /snap/amazon-ssm-agent/11797     29097984    29097984           0   1     
#>  5 /snap/core22/2133                77594624    77594624           0   1     
#>  6 /snap/snapd/25202                53346304    53346304           0   1     
#>  7 /snap/gnome-42-2204/226         541327360   541327360           0   1     
#>  8 /snap/thunderbird/812           237240320   237240320           0   1     
#>  9 /snap/gtk-common-themes/1535     96206848    96206848           0   1     
#> 10 /boot                           923156480   181092352   806707200   0.183 
#> 11 /boot/efi                       109395456     6399488   102995968   0.0585
#> 12 /snap/snapd/25577                53477376    53477376           0   1     
#> 13 /snap/core22/2139                77594624    77594624           0   1     
#> 14 /snap/thunderbird/825           237240320   237240320           0   1