Terminal文档常用操作

cd
ls
pwd: display the full path of your current directory

".." : access the directory just above your current directory
"~" : access your home directory

"vi filename.txt"
"emacs filename.txt":
To use Vim, type "vi filename.txt", where "vi" is the command to open the Vim text editor and "filename.txt" is the name of the file you want to edit. To use Emacs, type "emacs filename.txt". If the file exists, the text editor will open with the file. Otherwise, the text editor will open a blank file with the name you chose.

Save and quit. When you're finished editing your text file, press Escape to enter Command mode. To save your changes, type ":w" (for "write"). To quit Vim and return to the Terminal, type ":q". To save and quit in one command, type ":wq". To quit without saving your changes, type ":q!".

Open your text file in Emacs. Type "emacs filename.txt" to do so. On some operating systems, Emacs will open in a separate window, leaving you with your Terminal window still accessible. You should see your text file in the main part of the window, with two lines at the bottom that show the status of your operations in Emacs.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容