Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disk space check: add -P option to df #1

Open
alessandro-danti opened this issue Nov 25, 2014 · 1 comment
Open

disk space check: add -P option to df #1

alessandro-danti opened this issue Nov 25, 2014 · 1 comment

Comments

@alessandro-danti
Copy link

Hi,
I noticed that the output of df gets wrapped around on a new line when the device name is longer than 21 characters. See here:

[user@host ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_host-lv_root
                       17G  1.7G   15G  11% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/vda1             477M   69M  384M  16% /boot

the -P option would make the output POSIX compliant and then avoiding the line wrapping. Like here:

[user@host ~]$ df -hP
Filesystem                     Size  Used Avail Use% Mounted on
/dev/mapper/vg_host-lv_root      17G  1.7G   15G  11% /
tmpfs                           1.9G     0  1.9G   0% /dev/shm
/dev/vda1                       477M   69M  384M  16% /boot

This would make life easier when parsing the output of the script.
Thanks!

@yebo29
Copy link

yebo29 commented Mar 16, 2021

Also addressed in #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants