基础命令行操作:
1.ls
What does it means?
List directory contents 列出目录内容命令
Others:
ls -a: list directory contents, and do not ignore entries starting with)
ls -l: list directory contents, and use a long listing format
Example:
1
2
cd ~/Desktop
echo "hello,git command lines" > 1.txt
2.cat(猫??不不,cat是concatenate的简写)
What does it means?
Concatenate files and print on the standard output
文本输出命令,常用于查看文件的内容
三大功能:
a.$ cat filename 一次显示整个文件
b.$ cat>filename 只能创建新文件,不可编辑已有文件
c.$cat file1 file2>file将几个文件合并为一个文件
Example:
1
2
3
cd ~/Desktop
cat 2.txt
cat>2.txt
3.mv
What does it means?
move 移动命令,常用与移动文件和重命名
Example:
1
2
cd ~/Desktop
mv 2.txt 3.txt
4.touch
What does it means?
touch filename
摸一下哈哈,所以先在当前目录下创建文件,touch命令课更改文档或目录的日期时间,包括存取时间和更改时间
Example:
1
2
cd ~/Desktop
touch 4.txt
如何使用explainshell.com:
首先你要打开这个网站呗;
然后在灰色框框里输入需要explain的命令行;
按回车,解释信息即在灰色框框下方显示;
英文可以用狗狗translate翻译。