Skip to content
KerwinKoo edited this page Dec 26, 2015 · 1 revision

python 获取linux mount挂载信息

import commands

mount = commands.getoutput('mount -v')
lines = mount.split('\n')
points = map(lambda line: line.split()[2], lines)

print points

[[TOC]]

Clone this wiki locally