Stat function ExplanationTable header files: #include #include Define functions: Int stat (const char *file_name, struct stat *buf);Function Description: Obtains file information by filename, and is stored in the structure stat referred to by
Attention
1. Some platforms do not support Stat64,
2. Get the type of file size off_t,
The off_t type in Linux is a 32-bit long int (4 bytes) by default.
The file may overflow when it is too large.
It is recommended that GCC compile-time
Find the stat structure in the header file zookeeper. Jute. H. First, you need to understand the features of this variable:
1. Most zookeeper c api parameters exist.
2. It is passed out as the node information variable of znode for external query
C-language stat functionStat #include #include function prototype: int stat (const char * file_name, struct stat * buf) * * Function Description: **stat function get file_name points to the file status of the file and saves the file
The functions of these three functions are consistent and are used to obtain file-related information, but apply to different file objects. For the pathname parameter given in the function, the STAT function returns the information structure
Related functions: Fstat, Lstat, chmod, Chown, Readlink, UtimeHeader files: #include #include Define functions: Int stat (const char * file_name, struct stat *buf);Function Description: Stat () is used to copy the file state referred to in
Excerpt from: http://www.liweifan.com/2012/05/13/linux-system-function-files-operation/Recently in the Linux file operation related chapters, encountered a few structure, was engaged in dizzy, today is free, carefully studied a bit, benefited.First
reproduced from: http://blog.csdn.net/brucexu1978/article/details/7721313
Linux process status (PS stat) R, S, D, T, Z, X
March 11, 2012 Posted by Jian
PS Progress Status: process state codesPROCESS State Codes
Here are the different values of
NAMEStat Get file propertiesThis function is located in the header file.Function Prototypes:int stat (const char *path, struct stat *buf);Number of references:Path file paths + file nameBUF Pointer to bufferreturn value:-1 encountered an error0
Purpose:The stat command is used to display the status information of a file or file system, from the Coreutils software package, the general system comes with this command tool, which can obtain a lot of information related to the file system and
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.