20145306 "Information security system Design" interim summary

Source: Internet
Author: User

20145306 "Information Security system Design" Summary of previous exam errors

Fill in the blanks: in Linux bash, CTRL + A shortcut key is (move the cursor to the input outfit, equivalent to the home button)
In Linux you can use the (chmod) command to modify the file permissions
Linux does not have a C drive, D drive, and its file system directory is defined by the (FHS) standard.
The command to force the delete test file is (rm-f test).
The command to find the file created yesterday in the home directory is (find ~-ctime 1)
The command to package the home directory into Home.tar using the tar command is (TAR-CF Home.tar ~)
(Touch Test) command to create a blank file test.
ls | The function of the sort command is (display the current directory contents and sort) using grep to find the command in the current directory for the main function in that file (grep main *.c) *.c
The command that uses WC statistics HELLO.C and main.c a few lines of code is (wc-l hello.c main.c)
The LS command that implements the "Display files,sorted by Size" feature is the Find command (Ls–s) that finds all directories under the root directory (Find/-type D)
The command to find the value of the macro Stdout_fileno is (Grep-nr stdout_fileno/usr/include)
The (PC or program counter) register in the CPU always points to a machine language instruction in main memory
In a Linux system, the linker program is (LD)
(loader) Maps the contents of an executable file to storage and runs the program

Set breakpoints in main.c for Say_hello function gcc-g *.c-o main b Say_hello

The command for the Find configuration (configure) network card (interface) in Linux is (Man–k Configure | grep interface)

GDB uses commands (until) to jump out of a looping statement

In Linux, the command to disassemble the target code TEST.O (objdump-d TEST.O)

Two registers (%EBP and%ESP) hold pointers to important positions in the program stack.

The portion of the stack that is allocated for a single process (function) is called (stack frame)

The Linux command to unlock Sim.tar is (TAR-XVF Sim.tar)

Your own harvest.

Through the first seven weeks of study, the computer system such as the structure of memory and information on the representation and processing of computers have some basic understanding. In the learning method, before reading the textbook because the teacher wrote this week to read the goal and focus on learning, then have the purpose of reading, encounter will not be the problem must be timely solution. You can ask questions on the question-Answering forum to see if someone else is experiencing the same problem.

Their own lack of

Previous learning methods are not good, directly on the reading, no focus, resulting in reading difficult to go on, the knowledge point has not been quoted in time. In the future study should strengthen the practice.

Comments and suggestions on this course

This course is a very good way to learn, emphasizing self-study. The weekly blog and the next week's Monday test drive the learning process.

Learn the points of knowledge

Vim writes C code and uses GDB for debugging.

Common Linux Commands:

Mans
· You can use the Man (Manual page) command when you encounter difficulties in your Linux environment. To view the contents of the corresponding section, add the number of the corresponding section behind the man
· The man command is typically used in conjunction with pipeline commands
Man-k K1 | grep K2 | grep 2

Grep
· Used to find the file that contains the specified template style, and if the contents of a file are found to conform to the specified template style, the preset grep directive displays the column containing the template style. If you do not specify any file names,

Or the given file is named "-", the grep instruction reads the data from the standard input device.
· -N: Indicates the column number of the column before displaying the column that conforms to the template style.
-R: Lookup for recursion
Cheat command
Cheat is a very useful search tool that can easily tell you what you want.

Cat

· Parameters:
-N numbering of all output lines starting from 1
-B is similar to-n, except that it is not numbered for blank lines
-S When you encounter a row that has more than two consecutive lines, replace the blank line with one line

Find
· Usage: Find
List the files in the file system that match the description. You can refer to the file name, category, time, size, permissions and other different information combinations, only the exact match will be listed.

List all files in the current directory and its subdirectories with the file name ' C ': # Find. -name "*.C"
List all the general files in its subdirectory under the current directory: # find. -ftype F
List all files that have been updated in the current directory and its subdirectories in the last 20 minutes: # Find. -ctime-20

Locate
· How to use: Locate [-Q] [-d] [--database=]
Description: Locate allows users to quickly search the file system for the specified file. The method is to create a database that includes all the file names and paths within the system, and then simply query the database when looking for it, without actually going into the file system.

Sort
· Sorts the contents of the text file. The contents of the text file can be sorted in the unit of behavior.
· Parameters:
-M: Merge several sorted files.
-N: Sort by numeric size

Du
· Displays the size of the directory or file. DU displays the disk space occupied by the specified directory or file.
· Parameters:
-A: Displays the size of individual files in the directory.
-B: In bytes when displaying a directory or file size.
-C: Displays the sum of all directories or files in addition to the size of individual directories or files.

Ls
· Displays the contents of the specified working directory (lists the files and subdirectories included in the current working directory).
· Parameters:
-A show all files and directories
-A with-a, but not listed "." (current directory) and ".." (Parent directory)
-T lists the files in the order of establishment time
· List all the files and directories under the current working directory; add "/" to the name, and then add "*" to the file name: LS-AF


How to set up and use a static library

static function library:. A;
The files compiled from the static function library are larger because all the data from the library is integrated into the target code.
The compiled execution program does not require external library support because all the functions used are already compiled.
If the static function library changes, then your program must be recompiled.
Gcc-c hello.c
Ar Rcvs libhello.a hello.c
GCC main.c-o main-l.-lhello (or GCC main.c./libhello.a-o Main)

How to set up and use a dynamic library

Dynamic function library:. So;
The dynamic function library is not compiled into the target code at compile time, your program executes to the relevant function to call the corresponding function in the library, so the dynamic function library produces a small executable file.
Since the library is not integrated into your program, it is applied and invoked dynamically while the program is running, so you must provide the appropriate library in the running environment of the program.
The change of dynamic function library does not affect your program, so the upgrade of dynamic function library is more convenient.

Dynamic library generation: Gcc-fpic-c xxx.c
Gcc-shared-o libxxx.so XXX.O
• Use of shared libraries: Gcc-o main main.c-l.-lxxx

Writing makefile compiled code

Code Hosting Links

20145306 "Information security system Design" interim summary

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.