From nobody Mon Apr 18 11:12:44 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id B1DE411CB3BD; Mon, 18 Apr 2022 11:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Khkmr3m9zz3QSK; Mon, 18 Apr 2022 11:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650280364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jLyWExrq6wf4sGKH++PWdtAXCLsIlhudo3ievhVYV+Y=; b=Y7fBZbgifDdRLYjjq9s71VksbOpQTAwvmBiHahabLoUbmMO/Pg0z0Fdaunqjpaxq/8CwIi 7cebc2vKCb7SAI6w6pREYPeURtFURGHlBkcZ7KRsGtmyQ047gVTPgmXJwD6BU1AszTv7kb paBb0luxOdZga+pxuJ/OdrczkGY/0itnXNSMidVopy5yTs9zkqqZ4CdvTAPMjKx01jS3ln 4ZeqYCm6mbjKsSRP0/ycceFeJntOtUeWB3HchCxvLaQDNxiKqU3hMsoVm1sIfN3u/7bVH2 gDvSW0F2rJV0YmCXgqs5tBfG7/bj3K0G7Yn9nSMuRLsgNS6B6+baSWbWmHSEIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 62BF411BC2; Mon, 18 Apr 2022 11:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23IBCiGr053568; Mon, 18 Apr 2022 11:12:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23IBCiD7053567; Mon, 18 Apr 2022 11:12:44 GMT (envelope-from git) Date: Mon, 18 Apr 2022 11:12:44 GMT Message-Id: <202204181112.23IBCiD7053567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: ca5f7b7a320e - stable/12 - df(1): Add EXAMPLES section to man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: se X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: ca5f7b7a320ea259d6a0b6c498f6c73f0a5f92b3 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650280364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jLyWExrq6wf4sGKH++PWdtAXCLsIlhudo3ievhVYV+Y=; b=Enl0gEZxelVJJ2YkPLZNK10SRsU1uxqeUYWxmw4iPzF5Bc4Soz3i8Bn6VFfuCoV2m08Kd0 qcfgAZ7joH0sx0YYBhbR0SBZ2UJYh8WO9Jg5l7ULtHbP7tXihIMiSmqZTcu5rym15v7keV pyzKd6DsSjXnz8Z0sPmlyg0pKXEpsW2t7t/JpbIyM5Q4Ga4m0KD/KMjYG1AtVKMP1UcMyh r2TVeS18dYWriKqEPjpWRZ1PvymS+mvRGWCEnLHmzW5cMNglCsdMDSX6aZqRYG6Fik6aI5 MhkmUjfIwCl3Qpt4sx9uoCC+CK0FejGz2ZuxPCjVI3CCmiZhhyhCxRlbMn0aJQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650280364; a=rsa-sha256; cv=none; b=oDbuSLSGz7DtVhuaJiYnpThK1mimwmwzrm/D+k+YcFeWqoUpzRg9tjx/OI2+znGSDyJxXB KdQTfGWhNXuGD91mXjjU7vm7gDDGLaJGS1WuAD/FkbJNfFe5ED7VpqGr1ia4galmOnRHy9 C8h4Bfdjq8z8L/FPnIHjNumeeL2dxQJijbZKLDM+KAoSz96qyd1eJE3xx7WeAxzGlJhAzz aMi0EeBkdT4yuRik5wPhF4/BiF5y0d28pYN58ztkW5GPKc12/6XSdNcmBvVo66g3cgKgMC 4/sMcF7HZldWLdagFkpkSm0idYQ7ZsUurwtnOfdU14OM+KomacmJT9WedfU0tg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=ca5f7b7a320ea259d6a0b6c498f6c73f0a5f92b3 commit ca5f7b7a320ea259d6a0b6c498f6c73f0a5f92b3 Author: Fernando Apesteguía AuthorDate: 2020-10-05 13:39:37 +0000 Commit: Stefan Eßer CommitDate: 2022-04-18 08:41:10 +0000 df(1): Add EXAMPLES section to man page * Add EXAMPLES section with four simple examples. * Simplify -H flag description. This makes easy to see the difference between this flag and -h * While here, fix .Tn deprecated macro. Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26662 (cherry picked from commit ad3d2e7e4a18575f825b65a19e49720a513d2343) --- bin/df/df.1 | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/bin/df/df.1 b/bin/df/df.1 index 438edacc8b88..e618077cbf06 100644 --- a/bin/df/df.1 +++ b/bin/df/df.1 @@ -29,7 +29,7 @@ .\" @(#)df.1 8.3 (Berkeley) 5/8/95 .\" $FreeBSD$ .\" -.Dd August 8, 2017 +.Dd October 5, 2020 .Dt DF 1 .Os .Sh NAME @@ -98,12 +98,9 @@ Use unit suffixes: Byte, Kibibyte, Mebibyte, Gibibyte, Tebibyte and Pebibyte (based on powers of 1024) in order to reduce the number of digits to four or fewer. .It Fl H , Fl Fl si -.Dq Human-readable -output. -Use unit suffixes: Byte, Kilobyte, Megabyte, -Gigabyte, Terabyte and Petabyte (based on powers of 1000) in order to -reduce the number of -digits to four or fewer. +Same as +.Fl h +but based on powers of 1000. .It Fl i Include statistics on the number of free and used inodes. In conjunction with the @@ -159,10 +156,7 @@ command: df -t nonfs,nullfs .Ed .Pp -lists all file systems except those of type -.Tn NFS -and -.Tn NULLFS . +lists all file systems except those of type NFS and NULLFS. The .Xr lsvfs 1 command can be used to find out the types of file systems @@ -193,6 +187,52 @@ which allows units of bytes or numbers scaled with the letters The allowed range is 512 bytes to 1 GB. If the value is outside, it will be set to the appropriate limit. .El +.Sh EXAMPLES +Show human readable free disk space for all mount points including file system +type: +.Bd -literal -offset indent +$ df -ahT +Filesystem Type Size Used Avail Capacity Mounted on +/dev/ada1p2 ufs 213G 152G 44G 78% / +devfs devfs 1.0K 1.0K 0B 100% /dev +/dev/ada0p1 ufs 1.8T 168G 1.5T 10% /data +linsysfs linsysfs 4.0K 4.0K 0B 100% /compat/linux/sys +/dev/da0 msdosfs 7.6G 424M 7.2G 5% /mnt/usb +.Ed +.Pp +Show previously collected data including inode statistics except for devfs or +linsysfs file systems. +Note that the +.Dq no +prefix affects all the file systems in the list and the +.Fl t +option can be specified only once: +.Bd -literal -offset indent +$ df -i -n -t nodevfs,linsysfs +Filesystem 1K-blocks Used Avail Capacity iused ifree %iused +Mounted on +/dev/ada1p2 223235736 159618992 45757888 78% 1657590 27234568 6% / +/dev/ada0p1 1892163184 176319420 1564470712 10% 1319710 243300576 1% +/data +/dev/da0 7989888 433664 7556224 5% 0 0 100% +/mnt/usb +.Ed +.Pp +Show human readable information for the file system containing the file +.Pa /etc/rc.conf +: +.Bd -literal -offset indent +$ df -h /etc/rc.conf +Filesystem Size Used Avail Capacity Mounted on +/dev/ada1p2 213G 152G 44G 78% / +.Ed +.Pp +Same as above but specifying some file system: +.Bd -literal -offset indent +$ df -h /dev/ada1p2 +Filesystem Size Used Avail Capacity Mounted on +/dev/ada1p2 213G 152G 44G 78% / +.Ed .Sh SEE ALSO .Xr lsvfs 1 , .Xr quota 1 ,