张祎

导航

2015年11月29日

python 过滤出某后缀名文件

摘要: 以从某文件夹过滤出py文件为例:法1:import glob import osos.chdir(“./”)for file in glob.glob(“*.py”): print file法2:for file in os.listdir(“./”): if file.endswith... 阅读全文

posted @ 2015-11-29 16:14 张祎 阅读(6340) 评论(0) 推荐(0) 编辑

linux tar 命令 --致力于“一眼看懂,随手就用”的随笔

摘要: 基本玩法:压缩: tar -czf txt.tar.gz *.txt // 将当前目录下的所有txt文件,创建一个tar包,并用gzip算法,压缩成txt.tar.gz 文件解压: tar -xzf txt.tar.gz //将txt.tar.g... 阅读全文

posted @ 2015-11-29 15:58 张祎 阅读(208) 评论(0) 推荐(0) 编辑