Linux Common Command Guide

1. ll, ls displays files in the current directory.

2. ctrl+z to run the program in the background. ctrl+c terminates the current program.

3. jobs -l to view the background program and its pid number.

4. ps to view the current process.

5. mkdir creates a folder

6. vi/vim [file_name] Open the file_name file, if there is no file, create a new file

7. shutdown -h now Shut down immediately

8. ctrl+alt+t brings up terminal

9. rm -rf (delete the library and run away, use with caution!), r means to delete the folder and all files in the folder directory. f means forced deletion without giving any reminder (use with caution!).

10. cd ~ to enter the root directory.

11.tar command[1]

Example:

# 压缩文件 file1 和目录 dir2 到 test.tar.gz
tar -zcvf test.tar.gz file1 dir2
# 解压 test.tar.gz(将 c 换成 x 即可)
tar -zxvf test.tar.gz
# 列出压缩文件的内容
tar -ztvf test.tar.gz 

Definition:

-z: Use gzip to compress and decompress files

-v: --verbose List processed files in detail

-f : --file=ARCHIVE Use archive files or devices, this option is usually required

-c : --create creates a new archive (compressed package)

-x : Extract files from compressed archive

 

 

reference:

[1] https://blog.csdn.net/afei__/article/details/82619843

 

Guess you like

Origin blog.csdn.net/zjy997/article/details/112554113