#/usr/bin/python import os def travelTree(currentPath, count=0): if not os.path.exists(currentPath): print "no current Path" return if os.path.isfile(currentPath): fileName = os.path.basename(currentPath) print " "*count + "|_ &qu
Linux & Mac 1.下载tree lib //mac brew install tree //centos yum install tree //ubuntu apt-get install tree 用法 //显示所有文件 tree //显示深度2层 tree -L 2 2. 命令find组合 find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g' > structure.txt 移除node_module find . -pr
1.文件目录操作命令 (1) ls 显示文件和目录列表 a ls -l 显示文件的详细信息 b ls -a 列出当前目录的所有文件,包含隐藏文件. c stat '目录/文件' 显示指定目录/文件的相关信息,比ls命令显示的内容更多 (2) mkdir '目录' 创建目录 (3) touch '文件名' 当前目录下创建一个空文件 (4) echo '内容'>'文件名' 当前目录下生成一个带内容的文件 (5) cat.tac '文件名' 查看文件中的文本内容 a m
This is my operating system class design. scanner.h #include<string> using namespace std; #pragma once struct Scanner { int si; ]; Scanner(char ss[]){ int i; ; ss[i]; i++)s[i] = ss[i]; s[i] = ; si = ; while (s[si] == ' ')si++; } bool hasNext(){ ; }