#!/usr/bin/env python
import subprocess
def uname_func():
uname = "uname"
uname_arg = "-a"
print "Gathing system information with %s command:/n" % uname
subprocess.call([uname,uname_arg])
def disk_func():
diskspace = "df"
diskspace_arg = "-h"
print "Gather diskspace information %s command:/n" % diskspace
subprocess.call([diskspace,diskspace_arg])
def main():
uname_func()
disk_func()
if __name__ == "__main__":
main()
版权声明:本文为博主原创文章,未经博主允许不得转载。
Python
- 上一篇:Oracle查看高水位脚本
- 下一篇:Python创建Linux下文件夹



