Linux Application Development-system function mode file programming
a system call
Refers to the function library that invokes the system
Two-file descriptor
Nature: A number
The open file corresponds to a number that is a file descriptor
Three common functions
1 Open File
Open
2 Creating a File
creat
3 Closing files
Close
4 Read File
Read
5 Writing Files
Write
6 Locating files
Lseek
7 Copying file descriptors
Dup
Three man command lookup order
1 Command man Read
2 system Call function Man 2 read
3 Library functions
Four Linux under Main function parameters
void Main (int arge, char **argv)
Arge is the number of command-line arguments, argv is the parameter
ARGV[0] for the command name ARGV[1] bit first parameter argv[2] for the second argument
Column such as CP 1.c 2.c arge = 3 Argv[0] = CP argv[1] = "1.c" argv[2] = "2.c"
Linux application Development-system function mode file programming