stat:查看文件或者文件系统的状态  -->可以查看时间等属性

stat常见命令参数

Usage: stat [OPTION]... FILE...
Display file or file system status. -L, --dereference follow links
-Z, --context print the SELinux security context
-f, --file-system display file system status instead of file status
-c --format=FORMAT use the specified FORMAT instead of the default;
output a newline after each use of FORMAT
--printf=FORMAT like --format, but interpret backslash escapes,
and do not output a mandatory trailing newline.
If you want a newline, include \n in FORMAT.
-t, --terse print the information in terse form
--help display this help and exit
--version output version information and exit Valid format sequences for file systems: %a Free blocks available to non-superuser
%b Total data blocks in file system
%c Total file nodes in file system
%d Free file nodes in file system
%f Free blocks in file system
%C SELinux security context string
%i File System ID in hex
%l Maximum length of filenames
%n File name
%s Block size (for faster transfers)
%S Fundamental block size (for block counts)
%t Type in hex
%T Type in human readable form

常用的命令展示

查看/etc/hosts文件信息

stat /etc/hosts
Access: 2018-06-30 22:04:51.110015002 –0700 --> find atime
Modify: 2015-06-08 20:34:49.508018898 –0700 --> find mtime
Change: 2015-06-08 20:34:49.508018898 –0700 --> find ctime

查看文件属性权限   -c :格式化

stat -c %a /etc/hosts

Linux stat命令详解的更多相关文章

  1. linux awk命令详解

    linux awk命令详解 简介 awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大.简单来说awk就是把文件逐行的读入,以空格为默认分 ...

  2. linux cat 命令详解

    linux cat 命令详解 http://linux.chinaunix.net/techdoc/system/2007/11/16/972467.shtml adb shell su //这个不一 ...

  3. 【初级】linux rm 命令详解及使用方法实战

    rm:删除命令 前言: windows中的删除命令大家都不陌生,linux中的删除命令和windows中有一个共同特点,那就是危险,前两篇linux mkdir 命令详解及使用方法实战[初级]中我们就 ...

  4. Linux netstat命令详解

    Linux netstat命令详解 一  简介 Netstat 命令用于显示各种网络相关信息,如网络连接,路由表,接口状态 (Interface Statistics),masquerade 连接,多 ...

  5. linux grep命令详解

    linux grep命令详解 简介 grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来 ...

  6. Linux chmod命令详解

    Linux chmod命令详解 chmod----改变一个或多个文件的存取模式(mode)   chmod [options] mode files   只能文件属主或特权用户才能使用该功能来改变文件 ...

  7. 【转发】linux yum命令详解

    linux yum命令详解 yum(全 称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理, ...

  8. linux iostat命令详解 磁盘操作监控工具

    Linux系统中的 iostat是I/O statistics(输入/输出统计)的缩写,iostat工具将对系统的磁盘操作活动进行监视. 它的特点是汇报磁盘活动统计情况,同时也会汇报出CPU使用情况. ...

  9. linux yum 命令 详解

    linux yum命令详解 yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及SUSE中的Shell前端软件包管理器.基於RPM包管理,能 ...

  10. linux sort 命令详解(转 )

    linux sort 命令详解 sort是在Linux里非常常用的一个命令,管排序的,集中精力,五分钟搞定sort,现在开始! 1 sort的工作原理 sort将文件的每一行作为一个单位,相互比较,比 ...

随机推荐

  1. springboot-8- 日志配置

    1, logback配置 springboot 默认支持logback, 自动加载classpath:logback-spring.xml <!-- logback多文件输出 --> &l ...

  2. php在浏览器禁止cookie后,仍然能使用session的方法

    1.a.php页面 session_start(); $_SESSION['msg'] = "i love you"; $sn = session_id();//获取当前sessi ...

  3. 玩转mongodb(二):mongodb基础知识

    常用基本数据类型: null null用于表示空值或者不存在的字段: {"data":null} 布尔型 布尔类型只有两个值,true和false: {"data&quo ...

  4. java面试⑦高级部分

    2.6.2说一下Linux下面的一些常用命令 常用: pwd 获取当前路径 cd 跳转到目录 su -u 切换到管理员 ls 列举目录 文件操作命令: 文件 tail 查看 rm -rf 删除 vim ...

  5. onkeydown事件

    <img src="images/hot.jpg" alt="" id="imgId" class="img1"/ ...

  6. elasticsearch启动错误解决

    es启动默认不能使用root用户,所以需要新创建一个用户来启动. 启动时可能出现的问题: [1]: max file descriptors [4096] for elasticsearch proc ...

  7. vs2013中,自定义mvc 添加视图脚手架

    参考文章: http://weblogs.asp.net/imranbaloch/archive/2013/09/15/customizing-the-asp-net-mvc-5-web-api-2- ...

  8. DataGridView删除多行选中数据

    思路是找到最先选择和最后选择到的行 ,弄一个for循环,根据这些行的索引值在执行数据的删除. 我这里用了EF.             DialogResult result = MessageBox ...

  9. 比较json和fastjson的put()

    首先,分别运行下面两段json和fastjson的代码: import org.json.JSONException; import org.json.JSONObject; public class ...

  10. spring boot入门笔记(四) - 多环境配置、加载顺序、静态资源映射

    1.多环境配置 先描述下以前的开发流程:从SVN把项目下载到本地,各种修改配置文件,启动成功:完成功能后上传到公司的测试服务器,修改各种配置文件,启动成功:最后到上线的日子里,把新功能中涉及到的文件打 ...