Linux-unix System Programming Manual Learning notes
--michael Kerrisk
1. Linux proprietary programming Features:
⑴epoll, a mechanism for obtaining file I/O event notifications.
⑵inotify, a mechanism for monitoring file and directory
C language File read and write operation summary
C Language File operation
I. Reading and writing of standard documents
1. Open the file
The open operation of the fopen () file means that the file specified by the user is allocated a filename in
Void * memcpy (void * dest, const void * src, size_t n );Copy n Bytes from the starting position of the memory address in the source src to the starting position of the memory address in the target dest.
Void * memmove (void * dest, const void *
1. Prototype declaration: Char *strcpy (char* dest, const char *SRC);Header files: #include and #include Function: Copy a string that starts from the SRC address and contains a null terminator to the address space starting with destDescription: The
Mknod command: used to create a special file prototype: # mknod [options] device file name {bcu} device No. Times device No. www.2cto.com option [-mmode] [-- modemode] [-- help] [-- version] option:-m, -- mode...
Mknod command: used to create a
InputStream: Gets the byte input stream, Inputstream.read ("filename"),Reader: Reading a stream of charactersInputStreamReader: A bridge from bytes to characters. InputStreamReader (Inputstream.read ("filename"));Reader.read (InputStreamReader
MAN 2 read
NameRead-read from a file descriptor
Synopsis# Include
Ssize_t read (int fd, void * Buf, size_t count );
FD: the parameter is the file pointed to by the file descriptor.
Buf: You want to read the specified memory.
Size_t: How
RS-232 serial port, serial port by bit to send and receive bytes. Although it is slower than byte parallel communication, the serial port can use one line to send data while the other line to receive data. Typically, the serial port is used for
Mem series:
Void * memset (void * DEST, int C, size_t count );Set the Count character before DEST to the character C. Return the value of DeST.
Void * memmove (void * DEST, const void * SRC, size_t count );
Copy count byte characters from SRC to
Void * memset (void * DEST, int C, size_t count );Set count characters before DEST to C.
Returns the value of DeST.
Void * memmove (void * DEST, const void * SRC, size_t count );
Copy count byte characters from SRC to dest. If SRC and DEST
Linux file operation functions
Original article address:Open () write () read () Close function in Linux
Author:Yuxianxiaoxi
1. open () function
Function Description: Used to open or create a file. When opening or creating a file, you can specify
1.2 file input and output functions
The input and output of logical devices, such as keyboards, monitors, printers, and disk drives, can be completed through file management. The most commonly used disk files are used for programming. Therefore,
Function prototype: extern int memcmp (void * str1, void * str2, unsigned int N)
Parameter description: str1 and str2 are the specified strings to compare the first n Bytes of the two strings.Database Name: # include Function: compare whether the
Detailed description of C ++ string functions [go]
Reproduced from: http://zhanglong2004.spaces.live.com /? Owner = 1
Void * memset (void * DEST, int C, size_t count );Set count characters before DEST to C.
Returns the value of DeST.
Void * memmove (
1 memset Function Solution
1. Void * memset (void * s, int C, size_t N)
Purpose: set the value of the first n Bytes of the memory space S to the value c.2. Example # includeVoid main () {char * s = "golden Global View ";Clrscr ();Memset (S, 'G', 6);
Close (close the file)
Related functions
Open, fcntl, shutdown, unlink, fclose
Header file
# Include
Define functions
Int close (int fd );
Function Description
If the file is no longer needed after
Http://blog.chinaunix.net/u2/82646/showart_1359552.html
Open (open a file) Related functions: read, write, fcntl, close, Link, stat, umask, unlink, and fopenHeader file # include # Include # Include Define the int open (const char * pathname, int
Original1. About Inputstream.read ()When reading data from a data stream, it is easy to use the Inputstream.read () method for diagrams. This method is to read one byte at a time from the stream and is very inefficient. A better approach is to
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.