I just lately switched from a Home windows server 2016 to a FreeBSD Unix server. I wish to take a look at disk house on Unix command line. How do I in finding out disk house usage data the usage of the Unix command-line possibility?
Unix circle of relatives of working techniques be offering the next instructions to test disk house utilization as consistent with your wishes.
Take a look at disk house on Unix working gadget
Unix command to test disk house:
- df command – Displays the quantity of disk house used and to be had on Unix report techniques.
- du command – Show disk utilization statistic for every listing on Unix server.
Methods to show Unix disk utilization statistics
See disk utilization for all information within the present listing. Run:
du -a
To get the disk utilization of a listing tree and every of its subtrees for /house/vivek, input:
du /house/vivek
Alternatively, it’s imaginable to peer outout 1024-byte blocks if you happen to go the -k transfer, input:
du -k /house/vivek
Wish to see overall disk utilization of a listing tree? Check out:
du -s /house/vivek
248088 /house/vivek
One can summarize disk utilization for a selected listing as follows:
du -hs /house
1.4G /house
Subsequent allow us to display title and dimension of all py (Python) information in a selected listing. Additionally show grand overall on the finish:
du -ch /house/vivek/challenge/mgt1.2/*.py
Getting lend a hand about du command
Check out working the next guy command or see on-line guy web page here:
guy du
whatis du
Methods to show unfastened disk house data on Unix
To view the quantity of unfastened house within the report gadget, check out df command:
df
Wish to display details about /jails/www/ report gadget in 1024-byte blocks layout, run:
df -k /jails/www/
Filesystem 1024-blocks Used Avail Capability Fastened on zroot/jails/www 10745194355 3152328 10742042027 0% /jails/www
In a similar fashion, to turn details about /jails/www report gadget in MB blocks layout, input:
df -m /jails/www/
Filesystem 1M-blocks Used Avail Capability Fastened on zroot/jails/www 10493353 3078 10490275 0% /jails/www
How about GB blocks layout for /jails/www report gadget?, Check out:
df -g /jails/www/
Filesystem 1G-blocks Used Avail Capability Fastened on zroot/jails/www 10247 3 10244 0% /jails/www
Show a grand overall
Go the -c possibility:
df -c
Some model of Unix working techniques can show output in human readable layout. In different phrases, Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and Pebibyte:
df -H
Pattern outputs:
Filesystem Measurement Used Avail Capability Fastened on zroot/ROOT/default 11T 4.2G 11T 0% / devfs 1.0k 1.0k 0B 100% /dev fdescfs 1.0k 1.0k 0B 100% /dev/fd zroot/iocage 11T 148ok 11T 0% /iocage zroot/iocage/obtain 11T 131ok 11T 0% /iocage/obtain zroot/iocage/obtain/11.2-RELEASE 11T 285M 11T 0% /iocage/obtain/11.2-RELEASE zroot/iocage/pictures 11T 131ok 11T 0% /iocage/pictures zroot/iocage/jails 11T 131ok 11T 0% /iocage/jails zroot/iocage/log 11T 131ok 11T 0% /iocage/log zroot/iocage/releases 11T 131ok 11T 0% /iocage/releases zroot/iocage/releases/11.2-RELEASE 11T 131ok 11T 0% /iocage/releases/11.2-RELEASE zroot/iocage/releases/11.2-RELEASE/root 11T 1.2G 11T 0% /iocage/releases/11.2-RELEASE/root zroot/iocage/templates 11T 131ok 11T 0% /iocage/templates zroot/jails 11T 131ok 11T 0% /jails zroot/jails/fullbasejail 11T 364M 11T 0% /jails/fullbasejail zroot/jails/rsnapshot 11T 209G 11T 2% /jails/rsnapshot zroot/jails/www 11T 3.2G 11T 0% /jails/www zroot/tmp 11T 131ok 11T 0% /tmp zroot/usr/house 11T 220ok 11T 0% /usr/house zroot/usr/ports 11T 1.0G 11T 0% /usr/ports zroot/usr/src 11T 1.7G 11T 0% /usr/src zroot/var/audit 11T 131ok 11T 0% /var/audit zroot/var/crash 11T 131ok 11T 0% /var/crash zroot/var/log 11T 4.2M 11T 0% /var/log zroot/var/mail 11T 131ok 11T 0% /var/mail zroot/var/tmp 11T 131ok 11T 0% /var/tmp zroot 11T 131ok 11T 0% /zroot devfs 1.0k 1.0k 0B 100% /jails/rsnapshot/dev devfs 1.0k 1.0k 0B 100% /jails/www/dev |
Filesystem Measurement Used Avail Capability Fastened on
zroot/ROOT/default 11T 4.2G 11T 0% /
devfs 1.0k 1.0k 0B 100% /dev
fdescfs 1.0k 1.0k 0B 100% /dev/fd
zroot/iocage 11T 148ok 11T 0% /iocage
zroot/iocage/obtain 11T 131ok 11T 0% /iocage/obtain
zroot/iocage/obtain/11.2-RELEASE 11T 285M 11T 0% /iocage/obtain/11.2-RELEASE
zroot/iocage/pictures 11T 131ok 11T 0% /iocage/pictures
zroot/iocage/jails 11T 131ok 11T 0% /iocage/jails
zroot/iocage/log 11T 131ok 11T 0% /iocage/log
zroot/iocage/releases 11T 131ok 11T 0% /iocage/releases
zroot/iocage/releases/11.2-RELEASE 11T 131ok 11T 0% /iocage/releases/11.2-RELEASE
zroot/iocage/releases/11.2-RELEASE/root 11T 1.2G 11T 0% /iocage/releases/11.2-RELEASE/root
zroot/iocage/templates 11T 131ok 11T 0% /iocage/templates
zroot/jails 11T 131ok 11T 0% /jails
zroot/jails/fullbasejail 11T 364M 11T 0% /jails/fullbasejail
zroot/jails/rsnapshot 11T 209G 11T 2% /jails/rsnapshot
zroot/jails/www 11T 3.2G 11T 0% /jails/www
zroot/tmp 11T 131ok 11T 0% /tmp
zroot/usr/house 11T 220ok 11T 0% /usr/house
zroot/usr/ports 11T 1.0G 11T 0% /usr/ports
zroot/usr/src 11T 1.7G 11T 0% /usr/src
zroot/var/audit 11T 131ok 11T 0% /var/audit
zroot/var/crash 11T 131ok 11T 0% /var/crash
zroot/var/log 11T 4.2M 11T 0% /var/log
zroot/var/mail 11T 131ok 11T 0% /var/mail
zroot/var/tmp 11T 131ok 11T 0% /var/tmp
zroot 11T 131ok 11T 0% /zroot
devfs 1.0k 1.0k 0B 100% /jails/rsnapshot/dev
devfs 1.0k 1.0k 0B 100% /jails/www/dev
See df command guy web page here or by means of typing the next command for more information:
guy df
Conclusion
You discovered find out how to see unfastened and used disk house in addition to disk utilization statistics on Unix techniques.