For several days did not summarize on the net. I copied the PPT first in the book, so that when the record is convenient to listen to a lot of things, add something to it.
I want to look at the shell first, but without the preparation of the previous chapters, I can't do it with the video. So it's a step-by-step study.
Although the book in detail, but find out, online more convenient.
Iv. Common commands for documents
4.2 Rights Management Commands
4.3 File Search command
4.4 Help Commands
4.5 User Management commands
4.6 Compression Decompression Command
4.7 Network Commands
4.8 Power off Restart command
4.2 Rights Management
--chmod only root and file owners can change permissions
-R Recursive modification
R-4, W-2,x-1. Permissions on the directory, r, can enter, X, can list the contents of the directory, RX must exist at the same time. W, create/delete files in directory
eg, chmod g+w testfile, Chmod-r 777 TestDir
___chown only the root user can modify
Eg,chown UserA filename
___chgrp
___umask the user file-creation mask
-S: Displays the new file default permissions as RWX, otherwise in the form of data, such as 0022
0022: The first 0 represents a special permission. The remaining 022, with 777-022 being the true permission value
Default file permissions do not have x Execute permission, for security, antivirus so that it cannot run
When modifying permissions, the values to be modified, such as Rwxrwxr-x 775, need to be written to 777-775=002, eg, umask 0002
____ File Search command
__find
find[search scope [search criteria]
__find/etc-name init *init* Init???
-iname Case insensitive
__find/-size +204800//Find files larger than 100MB
+n is greater than, n is less than, N equals.
A data block is 512 bytes, 0.5k. 100M = 102400kb, * * = 204800 data block
So if 1m,1024*2= 2048
__find/home-user Sophie
-group
__find/etc-cmin-5//Find files and directories with modified properties in 5min
-amin Accessing Time Access
-cmin File Properties Change ... This is a little hard to remember, analogy chmode.
-mmin File Contents Modify
__find/etc-size +163840-a-size-204800//163840/2=81920/1024=80m
-a two conditions satisfy and
-O satisfies an OR
__find/etc-name inittab-exec ls-l {}\;
-exec/-ok command {}\; where {} represents the find result, \ is an escape character;
The result of-ok is that there will be an inquiry
__-type f,d,l
__inum based on I-node lookup
The _____locate is found in the file repository. Can save system and CPU resources, faster
Files in the system are periodically saved to the file repository. The/tmp folder will not be saved to the file repository.
-updatedb can update the file repository immediately
___which the directory where the search command resides and its alias information
The directory where the ___whereis command resides and its help document path
___grep
grep-iv[the specified string [file]//search for a string-matched line in the file and output
-I is case insensitive
-V excludes the specified string
eg, #grep Mysql/root/install.log
4.4 Help Commands
___man Manual
/content, can be searched, press N, check next
Commands: View name, description, Options
Configuration: View name, file format
Eg,man ls
eg, man Services//profile name, no path
Search for a short message instead of man:
__whatis + command, view name, description
__ Commands +--HELP, see options
__appropos + configuration, view name
___help
Help Umask
View Help for Shell built-in commands
Linux Learning 3