forked from JYB7913/Javascript201707
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80b9e84
commit d07e2c6
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
## linux | ||
|
||
1.创建空文件夹 | ||
``` | ||
mkdir 目录名 | ||
mkdir -p 11/22 递归创建 | ||
``` | ||
2.切换目录 | ||
``` | ||
cd 相对路径 | ||
cd .. 切换到上级目录 | ||
``` | ||
3. 创建空文件 | ||
``` | ||
touch 文件名 | ||
``` | ||
4.编辑文件内容 | ||
``` | ||
echo 内容 > 文件名 | ||
echo hello world >> 11.txt (追加) | ||
``` | ||
5.列出所有文件(包含隐藏文件) | ||
``` | ||
ls -al (-a 所有 -l信息) | ||
``` | ||
6.查看文件内容 | ||
``` | ||
cat 11.txt | ||
``` | ||
7.移动并修改文件名 | ||
``` | ||
mv 11.txt nn.txt | ||
``` | ||
8.复制文件 | ||
``` | ||
cp nn.txt n2.txt | ||
``` | ||
9.删除递归删除 | ||
``` | ||
rm -rf 11 | ||
``` | ||
10.查看当前所在目录路径 | ||
``` | ||
pwd | ||
``` | ||
|
||
11.vim编辑器(注意git commit -m "一定要写描述") | ||
- 1.编辑文件 | ||
``` | ||
vim 文件名 | ||
进入到输入模式 | ||
i/o/u | ||
esc 退出输入模式 | ||
q 直接退出不保存 | ||
q!强制退出 | ||
wq 保存并退出 | ||
wq! 强制保存并退出 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters