[root@localhost /]#
[root@localhost /]# cat strduiqi.py
#!/bin/python
import os, stat
li=os.listdir('/software/script/shell')
st=[n for n in li if n.endswith(('.sh','.py'))]
for nm in st:
os.chmod(nm,os.stat(nm).st_mode | stat.S_IXGRP)
[root@localhost /]#
[root@localhost /]#
阅读(1945) | 评论(0) | 转发(0) |