Read free space in Ubuntu via SSH (SSH, 2023, df)
Marc Wagner
March 20, 2023
Storage space on your computer is a limited resource that can sometimes run out, especially if you store a lot of files and applications. Therefore, it is important to monitor the available space on your system to make sure you have enough storage for important files and applications. Ubuntu is a popular operating system used on many computers, and there are several methods to monitor the available disk space on your Ubuntu system. In this blog post, we will show you how to read free space in Ubuntu.
Syntax description for use in the shell #
A short syntax description for using the command (df) in the shell (SSH):
df OPTION DATEI
OPTION and FILE are optional parameters
Examples of the “df” console command #
“df” is a command in the Unix and Linux operating system environment used to display information about storage capacity and usage on a file system. The name “df” stands for “disk free” and indicates how much disk space is still available on a particular file system.
Open a connection to your server via SSH with a terminal (e.g. putty) and enter the following line:
# Anzeigen des Speicherplatzes df # Lesbares Format, -h steht für --human-readable df -h # Informationen über eine Partition anzeigen, auf der sich die Datei "placeholder.png" befindet df -h placeholder.png
After entering the command, you will get a display similar to the following image:
Options / parameters #
Short form | Long form | Description |
-a | –all | Inclusion of all file systems |
-B 10 | –block-size=10 | Specification of the block size, 100.000 = 100kB |
-h | –human-readable | Output in a readable format |
-i | –inodes | Listing of INODE information |
-k | Setting the block size to 1k | |
-l | –local | Show local file systems only |
-t | –type=TYP | Consider only file systems of type TYPE |
-T | –print_type | Output file system type |
-x | –exclude-type=TYP | Consider all file systems except those of type TYPE |
Artikel von:
Marc Wagner
Hi Marc here. I’m the founder of Forge12 Interactive and have been passionate about building websites, online stores, applications and SaaS solutions for businesses for over 20 years. Before founding the company, I already worked in publicly listed companies and acquired all kinds of knowledge. Now I want to pass this knowledge on to my customers.