
linux
走天涯_1
努力学习各种算法
展开
-
利用SSH传输文件
如题:Linux scp命令 *1、从服务器上下载文件 –scp username@servername:/path/filename /var/www/local_dir(本地目录) *2、上传文件到服务器 –scp /path/filename username@servername:/path *3、从服务器下载整个目录 –scp -r username@servername:/var原创 2016-08-08 11:39:46 · 382 阅读 · 0 评论 -
Python 遍历文件夹的方法:
遍历文件夹是一个常用的功能.- 第一种方法:使用os.walk:# -*- coding: utf-8 -*- import os def Test1(rootDir): list_dirs = os.walk(rootDir) for root, dirs, files in list_dirs: for d in dirs: p原创 2016-08-08 12:03:18 · 568 阅读 · 0 评论