Before writingCodeThe function that reads the system time is often used. The localtime function is not thread-safe. If you call the localtime function in multiple threads, problems may occur.
In multi-threaded applications, localtime_r should be
Fix and delete files
1. debugfs
Open the partition where the deleted file is located.
Open/dev/sda2
2. Use the LS and-D parameters to display the directory of the file you just deleted.
Ls-D/root/Data
Shown in <> the angle brackets are
1. View commands
[Root @ WWW ~] # Sysctl-A | grep local
Or CAT/proc/sys/NET/IPv4/ip_local_port_range
2. Modify the port range
1) Permanent modification
Add the following line to VI/etc/sysctl. conf:
Net. ipv4.ip _ local_port_range = 1024 6
Tcpdump captures TCP identifiers
According to each 8-bit group, the TCP flag is located in the 13th 8-bit group, as shown in the following figure. The first row contains 32 digits ranging from 0 to 3 8-bit groups, the second row is a 4-7 eight-bit
Googleperformance toolsIntroduction
1. Installation
A) install libunwind
Libunwind isProgramThe C ++ library of the Call Stack. Because the built-in stack rollback function of glibc has bugs in 64-bit systems, we recommend that you use
Memcache is a high-performance distributed memory object cache system. By maintaining a unified and huge hash table in the memory, memcache can be used to store data in various formats, including image, video, file, and database retrieval results.
0 introduction
with the rapid development of information technology and Internet, information security and reliability issues become increasingly important. Currently, information security is faced with two basic attacks: passive attacks
": X "and ": the true differences between WQ and WQ are as follows:
: WQ forcibly writes the file and exits (Save the disk and exit write % quite ). Write the file forcibly even if it is not modified, and update the modification time of the
ExecFunction Family
It is called by the exec system. In fact, in Linux, there is no exec () function form. Exec refers to a group of functions, with a total of six functions:
# Include
Extern char ** environ;
Int execl (const char * path,
Use histtimeformat to display the timestamp of the History command
After you execute the history command from the command line, only the serial number of the executed command and the command itself are displayed. To view the timestamp of the
in Linux:
Generate an empty file of the specified size
dd If =/dev/Zero of = m. file BS = 1 m COUNT = 50
the generated file name is M. file empty file, write 50 times, write 1 MB each time;
①Null: defined as 0, 0l, or (void *) 0. It indicates that a pointer value is null, that is, nothing is specified;
②'\ 0': used and only uses the string Terminator., Is a character constant;Nul is the name of a character constant;
③Nul: 0x00,0
Virt:
1. The virtual memory size required by the process, including the database used by the process,Code, Data, as well as the heap space allocated by malloc and new, and the allocated stack space;
2. If the process applies for 10 MB of memory
HTTP request-and response-mode-based, stateless, and application-layer protocols, often based on TCP Connection Methods . HTTP allows transmission of any type of Data Objects , HTTP is a stateless protocol. Stateless means that the Protocol
Working principle of Reverse Proxy Server
I plan to study nginx recentlySource codeNginx can be used as a reverse proxy server to achieve load balancing. So I collected some information about the reverse proxy server and sorted it out
clear: Both
" Clear floating "clear is often used in CSS. The typical method is clear: Both;
This is the description in the CSS manual: the value of this attribute indicates that the edge of a floating object is not allowed. This
1,Use an existing object to construct a non-existing object (which does not exist before the construction), that is, the copy structure. If an existing object is used to overwrite another existing object, the value assignment operation is performed.
pay attention to a symbol extension problem: for example, suppose we want to print the hex representation of the short INTEGER (short)-1 memory. On the Win32 platform, a short type occupies 2 bytes, therefore, we naturally want to print it with four
field separator (FS) is the built-in variable of awk , the default value is blank and tab. awk will first refer to the content of FS for each field cutting. if ":" is also used as a delimiter , awk can automatically separate the hours and
crontab usage considerations
1. use common variables
when shell is executed on crontab, only a few system environment variables can be identified, normal variables cannot be identified. If you need to use variables in a script, you need
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