Command function:
Find binary Files locationFind the location of the software's configuration fileFind source code file locationView the man manual location
Grammar
The basic syntax is as follows:
Whereis commandORWhereis ProgramORWhereis
/*************************************** ***************************************** 0th types-Simplest and practical***************************************** ***************************************/.1. directly go to the lib directory of the source
For many new users who are learning advanced programming in the Unix environment (apue), the first problem may be the source code compilation in this book.. Almost every routine in this book will have such a line of source code:# Include "ourhdr.
1. chdir modify the working directory of the current process (Man 2 chdir view)int chdir (const char *path); //path Pathint fchdir (int fd); //fd File descriptorReturn value: 0 successfully returned, failure returned-1.2. GETCWD get the working
1 Directory operations Change the access rights of a directory or a file#include int chmod (constchar//mode like 0777The file specified by the path parameter is modified to have access rights given by the mode parameter.When the Modify permission
Transferred from: http://blog.csdn.net/fallenink/article/details/8480483Original address: http://sharp2wing.iteye.com/blog/1280802————————————————————————————————————————————————I.linux C Creating a directory function mkdir mode setting
1.For file operations, although they are implemented through function calls, they can be divided into two categories: system calls and library functions.2.In Linux, almost everything can be seen as a file.This means that ordinary programs can use
Formatted read/write:
# Include
Int printf (const char * format,...); // equivalent to fprintf (stdout, format ,...);
Int scanf (const char * format ,...);
Int fprintf (FILE * stream, const char * format,...); // The intermediate parameter is the
File IO is not cached, and each read and write calls the corresponding system call in the kernel.File IO common functions:Open, close, read, write, lseekFor the kernel, all open files have file descriptor references.The file descriptor is a
1. LS produces a list of file names, which is roughly how it works: Open directory+-> Read entry -end of dir?-+|__ display file Info | Close Directory 2, the directory is a special kind of file, its content is the name
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.