Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out the free disk space for a given path on a linux shell? [closed]

1) I am in some directory 2) I want to find out how much free space is left there

Is there a simple command that does this? I don't want to look in fstab or whatever, having to map the devices & mount points in my mind in order to determine how much free space I have left.

like image 807
Michael Böckling Avatar asked Jan 26 '09 09:01

Michael Böckling


People also ask

How do I check disk space on a specific directory in Linux?

Linux command to check disk space using:df command – Shows the amount of disk space used and available on Linux file systems. du command – Display the amount of disk space used by the specified files and for each subdirectory.

Which Linux command displays the amount of free space on a partition?

The df command stands for disk free, and it shows you the amount of space taken up by different drives. By default, df displays values in 1-kilobyte blocks.

How do I check disk free space?

How will I know how much space I have left? To check the total disk space left on your Windows 10 device, select File Explorer from the taskbar, and then select This PC on the left. The available space on your drive will appear under Devices and drives.


1 Answers

Try df -h

Better yet: df -h . or df -h path-to-file

like image 96
Joao da Silva Avatar answered Nov 15 '22 20:11

Joao da Silva