i
( iused
, ifree
) 및/또는 로 시작하는 열을 숨기려면 어떻게 해야 합니까 512-blocks
? 나는 단지 내 디스크가 얼마나 가득 찼는지 알고 싶을 뿐, 그들의 인생 이야기를 원하지 않습니다.
$ /bin/df
Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk0s2 975093952 719904648 254677304 74% 90052079 31834663 74% /
devfs 368 368 0 100% 637 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
/dev/disk3s1 242555008 206423680 36131328 86% 0 0 100% /Volumes/SERIALS
map -static 0 0 0 100% 0 0 100% /Volumes/ubuntu
map -static 0 0 0 100% 0 0 100% /Volumes/Large_backup
map -static 0 0 0 100% 0 0 100% /Volumes/Large
map -static 0 0 0 100% 0 0 100% /Volumes/Unsorted
map -static 0 0 0 100% 0 0 100% /Volumes/Record
map -static 0 0 0 100% 0 0 100% /Volumes/Documentaries
192.168.1.2:/ 115345392 86998112 22441976 80% 421924 3249100 11% /Volumes/ubuntu
192.168.1.2:/media/myusername/Documentaries 488397160 446990432 41406728 92% 15979 20720153 0% /Volumes/Documentaries
192.168.1.2:/media/myusername/Record 625121216 625121216 0 100% 125517 38323 77% /Volumes/Record
192.168.1.2:/media/myusername/Unsorted 625137280 604966376 20170904 97% 346496 10099404 3% /Volumes/Unsorted
192.168.1.2:/media/myusername/Large 1953520000 1949403312 4116688 100% 1379836 2218604 38% /Volumes/Large
192.168.1.2:/media/myusername/Large_backup 115345392 86998112 22441976 80% 421924 3249100 11% /Volumes/Large_backup
버전 정보
다음 각 시스템에서 원치 않는 동작(초과 정보)이 발견되었습니다.
GNU coreutils 8.28 September 2017 DF(1)
-Darwin Kernel Version 17.2.0
BSD . May 8, 1995 BSD
-Darwin Kernel Version 16.7.0:
원하는 동작(기본적으로 표시되지 않음)은 다음에서 관찰됩니다.
GNU coreutils 8.25 February 2016 DF(1)
- 에Ubuntu 16.04.1 LTS
,4.4.0-104-generic #127-Ubuntu
답변1
파이프 작업을 하려는 경우 다음을 시도해 볼 수 있습니다.
df | rev | awk '{$2=$3=$4=$8=""}' | rev
즉, rev와 awk가 있는 경우입니다.