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
1.安装Nodejs:去这里下载并安装。2.打开cmd,运行npm,node应该会有输出东西3.如果在window上运行Node.js的npm报Error: ENOENT, stat 'C:\Users\xxx\AppData\Roaming\npm'在C:\Users\xxx\AppData\Ro...
分类:
Web程序 时间:
2014-09-14 12:38:07
阅读次数:
197
1、运行spark报出如下错误: org.apache.hadoop.security.AccessControlException: Permission denied: 解决方法,添加用户:如下 sudo -u hdfs hadoop fs -mkdir /user/stat sudo -u hdfs hadoop fs -chown roo...
分类:
其他好文 时间:
2014-09-12 12:08:13
阅读次数:
205
近来读书,做些笔记,来年好翻翻。
本文所使用的操作系统为 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
<?php?
class?CServerInfo
{
????static?public?function?getCpuData($speed?=?0.5)
????{
????????if?(false?===?($prevVal?=?@file("/proc/stat")))?return?false;
?????...
分类:
系统相关 时间:
2014-09-10 18:01:14
阅读次数:
495
以下不少内容来自man手册
结构体struct stat
结构体struct stat用于保存文件相关的所有信息。
struct stat的基本成员如下所示
struct stat { dev_t st_dev; // 文件所在设备的设备id,可以分解为主设备号和此设备号 ...
分类:
其他好文 时间:
2014-09-10 12:34:00
阅读次数:
269
对于unknown的进程要crs_stop-f加进程名再startcrs启动失败crs_start-allCRS-0184:CannotcommunicatewiththeCRSdaemon.因为crs_start属于应用层的指令,启动crs的时候会失败[oracle@host1~]$crs_start-allCRS-0184:CannotcommunicatewiththeCRSdaemon.[oracle@host1~]$crs_stat..
分类:
数据库 时间:
2014-09-10 02:54:00
阅读次数:
214
磁盘blocksize=1024新建一个空目录[root@wqj-pca]#ll-ddrwxr-xr-x.2rootroot40969月821:12.<--目录文件占用4096B空间[root@wqj-pca]#ll总用量0<--所列项目占用空间为0[root@wqj-pca]#[root@wqj-pca]#stat.File:"."Size:4096Blocks:8IOBlock:4096目录Device:802h/2050dIno..
分类:
其他好文 时间:
2014-09-10 02:46:00
阅读次数:
264
[root@ma ~]# ps ww -p 1 PID TTY STAT TIME COMMAND 1 ? Ss 0:01 /sbin/init[root@ma ~]# ps -p 1 PID TTY TIME CMD 1 ? ...
分类:
其他好文 时间:
2014-09-09 18:10:59
阅读次数:
268
一般我们都知道用man手册去查看libc库的API的用法,例如man? strcpy、man stat ...其实内核里的一些API也可以编译到man手册中, 这样对于学习内核的,也无疑是一种很好的资料。 ----------------------------...