Ubuntu学习笔记(3)-常用的命令记录
记录一些常用的命令,包括vim和shell
Commands of Terminal
- ~ :home directory
- . :current working directory
- .. :parent of working directory
- ? :single char
- * :string of char
- ls -[a l R] :list the filename in the current directory[all detail or subDir]
- cd dir : change the dircetory to dir
- cp file1/dir1 file2/dir2 : copy A to B
- mv file1 file2: change filename
- mv file1 dir2 :move file1 to directory called dir2
- mkdir dir1:make a new directory called dir1
- rm -r dir1:delete dir1,including its subdir
- cat file | more /less
- chmod mode name
--user group other (u,g,o)
eg:chmod 755 dir1:将目录dir1,设定成任何使用者,皆有读取及执行之权利,但只有拥有者可做修
- chown [-R] username name
- ps/kill :find /stop the process
- jobs :background process
- kill %n :kill background process (the number of process)
--In Normal Mod:
- dd/yy (删除当前行)该行内容存放到剪贴版中
- p 粘帖
- u : undo
- <Ctrl-r> : redo
- :e <path/to/file> :打开一个文件
- :bn :你可以同时打开很多文件,使用这两个命令来切换下一个或上一个文件
- NG :到第N行
- gg :到第一行
- G :到最后一行
- <C-n/p> :自动提示
- <C-v> :块选择
- :sp filename :上下分割 并打开一个新文件
- Ctrl-w + 方向键 :在各个屏之间切换
以上只是个人经常使用的一些指令,更多内容可以参考
Unix命令大全 、简明 Vim 练级攻略
Steven Meng
2013.1.21
作者:StevenMeng 出处:http://www.cnblogs.com/steven-blog/欢迎转载或分享,但请务必声明文章出处。