Embedded system development study notes (1)

Linux operation

  1. Linux user operation commands
  2. Linux file operation commands
  3. File permission description

Linux file directory

/- root
/bin-user binary file
/sbin directory-system binary file
/etc-configuration file
/dev-device file
/proc-process information
/var-variable file
/usr-user program (software is generally installed in this directory)
/tmp-temporary files
/home-user home directory
/boot-boot loader files
/lib-system library

Linux user operation commands

Command
01, cd / enter the root directory
02, cd… return to the previous directory
03, cd. Enter the next directory
04, cd folder name to enter the file
05, clear clear the screen
06, b+ double-click tad to query the beginning of b Subdirectory
07, su identity switch identity
08, touch file name to create a file
09, adduser add user
10, sudo with the help of administrator authority
11, userdel delete user
12, pwd displays the current path

Linux file operation commands

Command
01, ls show how many files are in the current directory
02, ls -l show all file information
03, file classification:
Commonly used: (d) directory file (-) ordinary file (l) link file (c/b) device file
Not commonly used: (p) pipeline file (f) stack file (s) shared file
04, ls -a displays all files in the current directory, including hidden files
05, mkdir create directory
06, rm delete
07, rm -f force delete
08 , Rm -rf completely delete (recursively delete the directory and all subdirectories under the directory)
09
, ./ file name run the file 10, mkdir -p /file/file/file to create a multi-level directory
11, chmod modification Permission
Example: chmod g+x
adds executable permissions to the group of files chmod u+x adds executable permissions to the file owner
chmod o+x adds executable permissions to other users
r 4 w 2 x 1
chmod 777 means readable and readable Write executable (7=4+2+1)
12, gedit file name to open the text editor of the file
13, cat file name to view the contents of the file
14, rm -f *.c delete all files with the suffix .c
15 , Cp file name file name copy the first file into the second file
16. mv file name file name cut the first file and paste it into the second file
17. tar -zcf file name compression file
18. tar -xcf file name decompression file

File permission description

Example: -rwxr-xr-x 1.c
First group: rwx: The file is an ordinary file, and the file owner has read and write execution permissions.
Second group: rx: Files in the same group are readable and executable.
Third group: rx :Other users can read and execute the file

Part of the operation screenshot

image: cp file name file name copies the first file into the second file

cp file name file name copies the first file into the second file

Insert picture description here

mv file name file name Cut the first file and paste it into the second file

Insert picture description here

Copy the 2.c file in the root directory to the home directory

Guess you like

Origin blog.csdn.net/m0_52251623/article/details/114578485