linux c 获取文件的时间信息
来源:互联网 发布:ksp 原版阻力算法 编辑:程序博客网 时间:2024/06/04 08:13
/************************************************************************* > File Name: hello.c > Author: lizhu > Mail: > Created Time: 2015年11月20日 星期五 10时30分20秒 ************************************************************************/#include <time.h>#include <sys/types.h>#include <sys/stat.h>#include <stdio.h>void main( void ){ struct stat buf; int result; //获得文件状态信息 result =stat( "/home/lizhu/study/gg.c", &buf ); //显示文件状态信息 if( result != 0 ) perror( "显示文件状态信息出错" );//并提示出错的原因,如No such file or directory(无此文件或索引) else { printf("文件大小: %d", buf.st_size); printf("文件创建时间: %s", ctime(&buf.st_ctime)); printf("访问日期: %s", ctime(&buf.st_atime)); printf("最后修改日期: %s", ctime(&buf.st_mtime)); }}
0 0
- linux c 获取文件的时间信息
- Linux C 语言 获取系统时间信息
- Linux C 语言 获取系统时间信息
- Linux C 语言 获取系统时间信息
- Linux C 语言 获取系统时间信息
- VC获取文件时间信息的方法
- linux获取文件信息
- linux c 获取系统时间的方法
- Linux C 获取格式化的日期时间
- Linux C获取系统的运行时间
- Linux C 获取格式化的日期时间
- Linux下获取文件编译的时间
- 获取文件的版本信息和修改时间
- 获取linux系统的cup信息,内存信息c代码
- linux c 文件操作编程之获取目录信息的结构体dirent
- linux c获取系统信息
- linux C获取网络信息
- C/C++ 时间信息获取方式
- 要么做、要么走,千万不要混
- 用于Red Hat Enterprise Linux 6 (AMD64/EM64T)的HP智能阵列B140i SATA RAID控制器驱动程序 下载该文件即表示您同意惠普软件许可协议的条款和条件。
- Filed
- [LeetCode248]Strobogrammatic Number III
- ajax 加载数据到下拉框
- linux c 获取文件的时间信息
- js中截取字符串
- 再谈Docker-微服务的场景化应用
- DIV 拖拽效果
- B树
- 京东云实践:浅谈Redis主从复制
- EntboostIM 1.4.2 发布, 安卓开源手机IM, 企业IM
- awk入门简介
- 线程的引用