在 CentOS 5.5 上使用 sed 遇到一个bug $?echo?AAA?>?config
$?ln?-s?config?cfg
$?sed?-i?‘s/AAA/aaa/‘?cfg
sed:?ck_follow_symlink:?couldn‘t?lstat?c/config:?No?such?file?or?directory...
分类:
其他好文 时间:
2014-11-27 14:41:43
阅读次数:
185
今天在看源码是碰到了这个结构和函数,感觉挺不错的,所以就记下了#include #include struct stat的用法2010-12-09 17:35:20分类:C/C++预备知识:1. 函数名: lstat 需要包含的头文件: #include #incl...
分类:
其他好文 时间:
2014-11-17 15:28:58
阅读次数:
207
获取文件属性(struct stat):int stat(const char* restrict pathname,struct stat* restrict buf);int fstat(int fd,struct stat* restrict buf);int lstat(const char...
分类:
其他好文 时间:
2014-11-14 17:15:34
阅读次数:
252
1 引言本文将描述文件系统的一些特征和文件的性质,从stat函数开始,逐个讲解stat结构的成员以了解文件的属性。2 stat,fstat 和 lstat函数#include int stat(const char *restrict pathname,struct stat *restrict b...
分类:
其他好文 时间:
2014-11-13 22:07:18
阅读次数:
183
除了对文件进行打开,读写等操作。文件系统还有其他的特征和性质等着我们去研究哦。stat、fstat、lstat函数#include int stat(const char *restrice pathname, struct stat *restrict buf);int fstat(int fie...
分类:
其他好文 时间:
2014-11-04 14:27:41
阅读次数:
276
Namestat, fstat, lstat - get file statusSynopsis#include #include #include int stat(const char *path, struct stat *buf);int fstat(intfd, struct stat *...
分类:
其他好文 时间:
2014-10-24 09:15:25
阅读次数:
272
文件和目录:stat fstat lstat函数#include int stat( const char *restrict pathname, struct stat *restrict buf );int fstat( int filedes, struct stat *buf );int l...
分类:
其他好文 时间:
2014-10-14 02:11:27
阅读次数:
281
跟着达内视频,学习UC高级编程,完毕程序小练习。主要练习的函数为:int lstat(const char *path, struct stat *buf);size_t strftime(char *s, size_t max, const char *format, const struct t...
分类:
其他好文 时间:
2014-10-05 19:43:28
阅读次数:
221
1.依赖的头文件
#include
#include
#include
2.函数定义:
//通过传入文件路径,struct stat结构体指针的方式
int stat(const char *path, struct stat *buf);
//通过文件描述符获取文件对应的属性。文件打开后这样操作
int fstat(int fd, struct stat *buf)...
分类:
系统相关 时间:
2014-09-14 12:52:37
阅读次数:
352
近来读书,做些笔记,来年好翻翻。
本文所使用的操作系统为 CentOS7.0,如果不想装双系统的可以装虚拟机,可以参考这里:
http://blog.csdn.net/alex_my/article/details/38142229
Files and Directories
1 stat, fstat, lstat, fstatat
...
分类:
其他好文 时间:
2014-09-10 19:33:31
阅读次数:
193