diff --git a/translated/tech/20210729 Use df to check free disk space on Linux.md b/translated/tech/20210729 Use df to check free disk space on Linux.md index 6c52af8153..cd137ba851 100644 --- a/translated/tech/20210729 Use df to check free disk space on Linux.md +++ b/translated/tech/20210729 Use df to check free disk space on Linux.md @@ -3,20 +3,22 @@ [#]: author: (Seth Kenlon https://opensource.com/users/seth) [#]: collector: (lujun9972) [#]: translator: (piaoshi) -[#]: reviewer: ( ) +[#]: reviewer: (wxy) [#]: publisher: ( ) [#]: url: ( ) -使用 df 命令查看 Linux 上的可用磁盘空间。 +使用 df 命令查看 Linux 上的可用磁盘空间 ====== -利用 df 命令查看 Linux 磁盘还剩多少空间。 -![Free disk space][1] -磁盘空间已经不像计算机早期那样珍贵,但无论你有多少磁盘空间,总有耗尽的可能。计算机需要一些磁盘空间才能启动运行,所以为了确保你没有在无意间用尽了所有的硬盘空间,偶尔检查一下是非常必要的。在 Linux 终端,你可以用 df 命令来做这件事。 +> 利用 df 命令查看 Linux 磁盘还剩多少空间。 -df 命令可以显示文件系统中可用的磁盘空间。 +![](https://img.linux.net.cn/data/attachment/album/202108/04/110742netskjccb5vzvujk.jpg) -要想使输出结果易于阅读,你可以加上 --human-readable(或其简写 -h)选项: +磁盘空间已经不像计算机早期那样珍贵,但无论你有多少磁盘空间,总有耗尽的可能。计算机需要一些磁盘空间才能启动运行,所以为了确保你没有在无意间用尽了所有的硬盘空间,偶尔检查一下是非常必要的。在 Linux 终端,你可以用 `df` 命令来做这件事。 + +`df` 命令可以显示文件系统中可用的磁盘空间。 + +要想使输出结果易于阅读,你可以加上 `--human-readable`(或其简写 `-h`)选项: ``` $ df --human-readable @@ -26,7 +28,7 @@ Filesystem      Size  Used Avail Use% Mounted on 在这个例子中,计算机的磁盘已经用了 52%,还有 500 GB 可用空间。 -由于 Linux 完整地看待所有挂载设备的文件系统,df 命令会展示出连接到计算机上的每个存储设备的详细信息。如果你有很多磁盘,那么输出结果将会反映出来: +由于 Linux 从整体上看待所有挂载设备的文件系统,`df` 命令会展示出连接到计算机上的每个存储设备的详细信息。如果你有很多磁盘,那么输出结果将会反映出来: ``` $ df --human-readable @@ -44,7 +46,7 @@ tmpfs            12G  848K   12G   1% /run ### 查看总的可用磁盘空间 -如果你的文件系统确实很复杂,而你希望看到所有磁盘的总空间,可以使用 --total 选项: +如果你的文件系统确实很复杂,而你希望看到所有磁盘的总空间,可以使用 `--total` 选项: ``` $ df --human-readable --total @@ -72,7 +74,7 @@ via: https://opensource.com/article/21/7/check-disk-space-linux-df 作者:[Seth Kenlon][a] 选题:[lujun9972][b] 译者:[piaoshi](https://github.com/piaoshi) -校对:[校对者ID](https://github.com/校对者ID) +校对:[wxy](https://github.com/wxy) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出