20145309 Information Security System Design Foundation 8th Week study summary under

Source: Internet
Author: User

Summarize

Knowledge points Summary of common Linux commands
    • The command format for Linux is: The command [options] [arguments] [] representation is optional, that is, the constituent structure is: command [options] [parameters]
Man command
    • The man command is a help instruction under Linux, which allows you to view information such as instruction help, configuration file Help, and programming help in Linux.
    • Common options:
      • -A: Search in all man help manuals
      • -K: Search online Help based on keywords, is a fuzzy search
      • -F: Keyword exact search, equivalent to the Whatis directive, displays a short description of a given keyword
      • -P: Use a pager when specifying content
      • -M: Specify the path of the man manual search
    • Parameters:
      • Number: Specify which man manual to search for help
      • Keywords: Specify keywords to search for help
    • Man-k: Commonly used to search, combined with pipe use. Examples are as follows: Man-k K1 | grep K2 | grep 2
Cheat command
    • On Linux, the Man command is almost omnipotent, but it is not the most efficient. Because it gives the help information very long, in a short period of time not understanding, so in this case, with the cheat command more convenient, cheat command simply, is to tell you how to use a command. It does not provide any additional extraneous information, only by using an instance to tell you how a command is used.
grep command
    • The grep command is a powerful text search tool that uses regular expressions to search for text and print matching lines. The grep full name is global Regular expression Print, which represents the globally regular expression version, and its use rights are for all users.
    • Command format: grep [options]
    • [Options] Main parameters:
      • -C: Output only the count of matching rows
      • -I: Case insensitive (only for single-character)
      • -H: Do not display file names when querying multiple files
      • -L: Only file names with matching characters are output when querying multiple files
      • -N: Display matching lines and line numbers
      • -S: Do not display error messages for nonexistent or no matching text
      • -V: Displays all lines that do not contain matching text
    • If you want to find a macro, we know that the macro is saved in the Include folder, so you can use the following statement:grep -nr XXX /usr/include(XXX为所要找的宏)
Find command
    • The Find command is used to locate files under the specified directory. Any string that precedes the parameter will be treated as the name of the directory you want to find. If you use this command without setting any parameters, the Find command looks for subdirectories and files under the current directory. and displays all the subdirectories and files that are found.
    • Command format:find pathname -options [-print -exec -ok ...]
    • Parameters:
      • The directory path that the Pathname:find command looks for. For example, use. To represent the current directory, and/to represent the system root directory
      • The Print:find command outputs the matched file to the standard output
      • The Exec:find command executes the shell command given by the parameter to the matching file in the form of ' command ' {} \; Note the space between {} and \;
      • OK: the same function as-exec, except that the shell command given by this parameter is executed in a more secure mode, and before each command is executed, a prompt is given to let the user determine whether to execute
    • Common options:
      • -name: Find files by file name
      • -perm: Find files according to file permissions
      • Mtime-n +n: Finds files according to file change time,-n means file change time is less than n days, + n means file change time is now N days ago
      • -newer file1! File2: Find changed time than file File1 new but older than file File2 file
      • -type: Find a file of a certain type, such as: B-Block device file, D-Directory, C-character device file, p-pipe file, L-Symbolic link file, F-Normal file
      • -size N:[c] Find files with a file length of n blocks, with C indicating the length of the file in bytes
      • -depth: When looking for a file, first find the file in the current directory, and then look in its subdirectories

You can refer to this post: (http://www.cnblogs.com/hrhguanli/p/4594724.html),

20145309 Information Security System Design Foundation 8th Week study summary under

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.