ArticleDirectory
Option
Note:
Example
Tips
Create a link for a file
Ln [Options]Existing-File[New-Link]
Ln [Options]Existing-file-List Directory
Ln can create hard links or symbolic (soft) links for one or more
Lien0000342014-08-27
The kernel uses three data structures to indicate open files: file descriptor table, file table, and V node table.
(1) Each process has a record item in the process table. The record item contains an open file descriptor table,
Chapter 2: I don't know much about it. I think it's not that important.
3.1. Introduction
Most file I/o on a UNIX system can be saved med using only five functions:Open,Read,Write,Lseek, AndClose. We then examine the effect of various Buffer
# Pragma once
This is a commonly used command. You only need to add this command at the beginning of the header file to ensure that the header file is compiled once.
# Pragma once is used to prevent a header file from being included multiple times,
1. File Operations (buffering) based on file pointers)In Linux, most resources can be processed as files. Common file types include: l common files l unknown pipelines and named pipelines l directory l device l symbols connect l socket common files:
Let's take a look at the figure below:
When I/O redirection is performed, only the FD of different input tables points to the same file table structure.
The following important functions are used for I/O redirection:
int dup( int oldfd );int dup2(
Original article:A simple, extensible HTTP server in cocoa
Address: http://cocoawithlove.com/2009/07/simple-extensible-http-server-in-cocoa.html
HTTP is a simple communication protocol between computers. On the iPhone, because there is no APIs for
1. the kernel uses three data structures to indicate opened files. The relationship between them determines the impact of one process on another process in file sharing. (1) each process has a record item (task_struct) in the progress table,
Lien0000342014-10-07
In the process control trilogy, we learned that fork is the first part of the trilogy to create a new process. However, we haven't covered much more in-depth information about fork, such as the relationship between new processes
Copy is also called copy. We do not know how many operations are performed every day, but do you really use it? Sometimes, simple copy operations may also encounter some minor issues: the copied text is changed to garbled, encrypted Web
Precompiled command # pragma usage
Recently, when I was looking at the code in an open-source project, I found that the # pragma program was used in many places. Therefore, I asked a Google instructor and summarized the common usage of the # pragma
DuLinks: http://www.zhihu.com/question/21591490/answer/18762821Source: KnowCopyright belongs to the author. Commercial reprint please contact the author for authorization, non-commercial reprint please specify the source.@Jerry have explained a very
Transferred from: http://www.cnblogs.com/hokyhu/archive/2009/03/30/1425604.htmlIn order to avoid the same file being include multiple times, there are two ways in C/s + +, one is #ifndef and the other is #pragma once mode. There is not much
When storing files, in order to save storage space, you need to implement file de-weight, that is, the same file only on the server to store one copy. One implementation is to upload the file to the application server, calculate the MD5 and store it
I. Scenario ONE: The process opens this fileWhen a file is being used by a process, the user deletes the file, and the file is only removed from the directory structure, but is not deleted from the disk. When the process of using this file ends, the
file Descriptor: opening a file in a Linux system will get the file descriptor, which is a small positive integer. Each process holds a file descriptor table in the PCB (process Control Block), which is the index of the list, and each table entry
LN is a very important command in Linux. Her function is to create a synchronized link for a file in another location, the most commonly used parameter of this command is-S.The specific usage is:Ln-s Source File Destination file-S is the meaning of
Http://www.cppblog.com/szhoftuncun/archive/2007/10/28/35356.html
To prevent the same file from being included multiple times
1# Ifndef Mode2# Pragma once MethodThere is no big difference between compilers that support these two methods, but
To prevent the same file from being included multiple times, there are two methods in C/C ++: # ifndef and # pragma once. There is no big difference between compilers that support these two methods, but there are still some minor differences between
To prevent the same file from being included multiple times
1# Ifndef Mode2# Pragma once MethodThere is no big difference between compilers that support these two methods, but there are still some minor differences between the two.Method 1:
#
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.