To find out how much disk space is left on a hard drive on a Linux system, you can use the df
command. df
is a utility that displays information about the available and used disk space on the system.
Here's an example of how to use df
to find out how much disk space is left on a hard drive:
$ df -hSuorce:www.lautturi.com
The -h
option tells df
to display the sizes of the file systems in "human-readable" format, meaning that the sizes will be displayed in a more readable format (e.g., in megabytes or gigabytes, rather than in blocks).
This will display a list of the file systems on the system, along with their sizes, used space, and available space. The hard drive will typically be represented by a file system with a mount point of /
(the root file system).
For example, the output might look something like this:
Filesystem Size Used Avail Use% Mounted on /dev/sda1 9.9G 3.7G 6.2G 38% /
This indicates that the hard drive (/dev/sda1
) has a total size of 9.9 GB, with 3.7 GB used and 6.2 GB available.
Note: The specific options and syntax for the df
command may vary depending on your Linux distribution and version. Consult the df
man page or documentation for your system for more information.