linux - 如何使用 df 命令查找可用和已用内存总量

标签 linux bash shell unix vi

我有

-bash-4.1$ df -l 
Filesystem     1K-blocks     Used Available Use% Mounted on
/dev/sda1       16126920  8557072   6750648  56% /
tmpfs           33026676        0  33026676   0% /dev/shm
/dev/sda5      151897244 51004788  93176464  36% /state/partition1
/dev/sda2        4031680   358884   3467996  10% /var

现在我需要获取除 tmpfs 之外的可用磁盘空间总数。 现在我需要获取除 tmpfs 之外的总可用磁盘空间计数。

获取总可用磁盘和已用磁盘的命令是什么?

最佳答案

to get the total available disk and used disk?

df -lh --total /dev/sda*

----------

要仅排除类型 tmpfs:

df -lh --total -x tmpfs

关于linux - 如何使用 df 命令查找可用和已用内存总量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46741895/

相关文章:

bash - 部署和ConfigMap之间有什么关系?

python - 如何在 python 中使用来自 bash 的数据流和子进程

shell - 如何使用弹出窗口在 xamarin shell 标题中设置背景图像?

linux - 如何准确显示命令输出的 10 行

linux - EC2 中的 apt 命令采用了错误的版本

linux - 如何使用 sudo 将输出重定向到我无权写入的位置?

bash - 如何从终端制作像Socks代理这样的SSH隧道

linux - 收集在另一个 shell 脚本中运行的 shell 脚本的标准输出日志

python - Linux 中的用户空闲时间

linux - 无法从嵌套子 shell 传递变量