Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 df -h 命令输出转换为 excel 格式或 csv 文件。
df -k | tr -s " " | sed 's/ /, /g' | sed '1 s/, / /g' | column -t df -h | column -t
我已经尝试如上,但格式不正确。我无法将格式加载到 Excel 或表格中。
你能帮忙吗
尝试这个:
df -k | tr -s " " | sed 's/ /, /g' | sed '1 s/, / /g'
看到这个