我有一个用于磁盘使用的脚本文件,并得到以下错误:
$ DISKTOTAL=$(df -m |column -t |awk '{print $2}' |tail -n +2|awk '{Total=Total+$1} END{print Total}')
df: '/var/lib/ureadahead/debugfs/tracing': No such file or directory
$ DISKUSAGE=$(df -m |column -t |awk '{print $3}' |tail -n +2|awk '{Total=Total+$1} END{print Total}')
df: '/var/lib/ureadahead/debugfs/tracing': No such file or directory
$ DISKUSAGEPERCENT=$(echo "$DISKUSAGE / $DISKTOTAL * 100.0"|bc -l)
-bash: /usr/lib/command-not-found: /usr/bin/python3: bad interpreter: Permission denied它还在执行脚本时给出了此错误:
-bash: line 7: bc: command not found为什么它不识别我的bc命令中的DISKUSAGEPERCENT命令?
发布于 2022-11-17 10:26:21
尝试安装bc:
sudo apt install bchttps://askubuntu.com/questions/1441190
复制相似问题