

In addition to these options, you can specify one or more files to df. To print all file systems, including the ones that have no space, such as /proc and /dev/pts, use the -a option: To list available and used inodes, use the -i option: To print file systems of a particular type, you can use the -t option: To produce output in a more human-readable form, use the -h option:
#Check disk space mac command free
In the example above you can see the device file associated with the file system, the total amount of space on the file system, the used space on the file system, the free space on the file system, the percentage of space that’s used, and the mount point. Invoked without any options, this command shows disk space usage on all of a system’s partitions:
#Check disk space mac command how to
You learned how to see free and used disk space as well as disk usage statistics on Unix systems.To check how much disk space your files are using, you can use the df command. See df command man page here or by typing the following command for more info: Zroot/var/audit 11T 131k 11T 0% /var/audit Zroot/usr/ports 11T 1.0G 11T 0% /usr/ports Zroot/jails/www 11T 3.2G 11T 0% /jails/www Zroot/jails/rsnapshot 11T 209G 11T 2% /jails/rsnapshot Zroot/jails/fullbasejail 11T 364M 11T 0% /jails/fullbasejail Zroot/iocage/templates 11T 131k 11T 0% /iocage/templates Zroot/iocage/releases/11.2-RELEASE/root 11T 1.2G 11T 0% /iocage/releases/11.2-RELEASE/root Zroot/iocage/releases/11.2-RELEASE 11T 131k 11T 0% /iocage/releases/11.2-RELEASE Zroot/iocage/releases 11T 131k 11T 0% /iocage/releases Zroot/iocage/log 11T 131k 11T 0% /iocage/log (You can also use a little-known shortcut to open one from anywhere.) In the window that opens, click on the drive you’d like to check in the sidebar. Open a new Finder window by pressing Command+N or selecting File > New Finder Window in the menu bar. Zroot/iocage/jails 11T 131k 11T 0% /iocage/jails The most basic way to check free disk space on a Mac is by using Finder. Zroot/iocage/images 11T 131k 11T 0% /iocage/images Zroot/iocage/download/11.2-RELEASE 11T 285M 11T 0% /iocage/download/11.2-RELEASE Zroot/iocage/download 11T 131k 11T 0% /iocage/download In other words, Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and Pebibyte:įilesystem Size Used Avail Capacity Mounted on Some version of Unix operating systems can display output in human readable format. Zroot/jails/www 10247 3 10244 0% /jails/www Display a grand total How about GB blocks format for /jails/www file system?, Try:ĭf -g /jails/www/ Filesystem 1G-blocks Used Avail Capacity Mounted on Similarly, to show information about /jails/www file system in MB blocks format, enter:ĭf -m /jails/www/ Filesystem 1M-blocks Used Avail Capacity Mounted on

Want to show information about /jails/www/ file system in 1024-byte blocks format, run:ĭf -k /jails/www/ Filesystem 1024-blocks Used Avail Capacity Mounted on To view the amount of free space in the file system, try df command: Whatis du How to display free disk space info on Unix Try running the following man command or see online man page here: Also display grand total at the end:ĭu -ch /home/vivek/project/mgt1.2/*.py Getting help about du command Next let us show name and size of all py (Python) files in a specific directory.

One can summarize disk usage for a specific directory as follows: Want to see total disk usage of a directory tree? Try: However, it is possible to see outout 1024-byte blocks if you pass the -k switch, enter: To get the disk usage of a directory tree and each of its subtrees for /home/vivek, enter: See disk usage for all files in the current directory. How to display Unix disk usage statistics du command – Display disk usage statistic for each directory on Unix server.df command – Shows the amount of disk space used and available on Unix file systems.

Please consider donating money to the nixCraft via PayPal/ Bitcoin, or become a supporter using Patreon.Ĭheck disk space on Unix operating system It is hard to keep the site running and producing new content when so many people block ads. I get it! Ads are annoying but they help keep this website running. My website is made possible by displaying online advertisements to my visitors.
