Terminal/Command Prompt

Terminal/Command Prompt

Start GitBash and enter its terminal command window. All instructions are implemented in this window.
Check the version number:git --version

Directory switching and display

# 切换到  /tmp 目录 :cd /tmp
向上一层目录移动:cd ..
显示当前所在目录:pwd
切换到使用者的home / project 下的namecards 目录:cd ~/ project /namecards(`~`表示home目录)

document list

List all files in the current file directory:ls

Create files and directories

touch try.txt

If the try.txt file does not exist, it will be created, if it already exists, the last modification time of the file will be modified, and the original content will not be changed.

mkdir demo

This command will create a directory named demo in the current directory

File operations

Copy the file try.txt and name the copy copy.txt: cp try.txt copy.txt
Rename file: mv try.txt rename.txt
Delete file: rm rename.txt
Delete all txt files in the current directory:rm *.txt

Guess you like

Origin blog.csdn.net/weixin_44333597/article/details/109436748