I have been in touch with embedded Linux for nearly three years. I have been a Linux veteran since I started my step-by-step exploration. Many colleagues or friends around me are still learning Linux, and I am always confused, to record your
VI Visual Interface
Three ways of working
1. Command Method
For example, when querying/session, we press/in command mode.
2. Input Method
You can edit the file here.
3. Ex escape
They all start with a colon (:), for example, WQ: Q!
Recently, the company's machine room has a bad air conditioner, leading to frequent problems with Linux servers used for development and testing. The disk is the most vulnerable. After several crashes and brute force restarts, it cannot be started
4. Summary
4.1 kobject, kset, and ktype
Kobject, kset, and ktype have three structs, but they are easy to confuse because they are intertwined.
L kobject is a basic object in the device model. It contains reference counting, parent-child
White: indicates the normal file Blue: indicates the directory Green: indicates the executable file RED: indicates the compressed file light blue: The Link file Red flashing: indicates the link file has a problem Yellow: indicates the device file
A gateway is a vro in a network and acts as an access point to access other networks. When the IP address does not match the IP address in the route table, the default gateway is used.
Use netstat-R or route-N in Linux to view the default gateway.
Cu homepage comment fh265> blog, Weibo, album, personal center, friend message [exit] Comment
Announcement: remembering that the Dennis Ritchie event is about to kick off! Xiao Bai's blog-improve yourself and share others
Xiaoyun.blog.chinaunix.net
========================================================== =============================== Original blog, reprinted please declare the source of Electronic coffee (original id blue rock) ========================================================== ====
Macro mark
The vast majority of initialization functions and variables in the Linux Kernel use a variety of macro tags, such;
Static int _ init pci_porc_init (void ){
...
}
Static char version [] _ devinitdata = drv_name ".."
Module_init (...)
Where
Swap is used if the system's physical memory is used up. The system will run slowly but still run. If swap space is used up, the system will have an error. Generally, the error "application is out of memory" may occur. In severe cases, the service
In Linux, fork () is implemented using copy-on-write. Copy at write time is a technology that can delay or even avoid copying data. At this time, the kernel does not copy the address space of the entire process, but shares the same address space
Du view disk capacity and disk space
Create a new file system in mkfs
CMP compares two files and indicates the first difference
Diff compares two files, listing all different places
Cat displays the file content. If the file content exceeds one
1 Linux security is non-toxic
2. There are few Linux games, especially those that do not have live football. This prevents you from directly clicking the live football icon when you start your system like windows.
3 programming tools such as GCC,
# Include Int getrusage (INT who, struct rusage * r_usage );
Getrusage can be used to obtain information about resources of a process. For example, user overhead time, system overhead Time, and received semaphore;
The following is the structure of
Apparently, we saved the data prepared for the inquiry command to a struct we defined, that is, structdata_ptr [36], but we were responding to a SCSI command, the answer is the SCSI core layer. They passed a scsi_cmnd struct, namely, the Server Load
Socket ()
We use the system to call socket () to obtain the file descriptor:# Include # Include Int socket (INT domain, int type, int Protocol );Set the first parameter domain to "af_inet ".The second parameter is the set interface type:
2011-9-23
Sed command usage reference: http://www.linuxsir.org/bbs/showthread.php? T = 189620, http://jiebaiyou.blog.163.com/blog/static/11624901820094201479719/
$ Sed '/test/{n; S/AA/BB/;}' example ----- if test is matched, move it to the next row
This method has been verified multiple times in the fedora system.
Suppose you have a Linux system that can work normally. Now you want to copy a system to another hard disk to enable this backup hard disk immediately when the system crashes, that
Recently, the entire basic thing has discovered how difficult it is to unify people's thoughts. It is more difficult to express a small thing in words. If you want to do embedded work, I recommend a few books. I have all these PDF documents. You can
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