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. JVM笔记6-垃圾回收器

    JVM进行垃圾回收时要考虑哪的问题如下: 1.如何判定对象为垃圾对象? 1.引用计数法:在对象中添加一个引用计数器,当有地方引用这个对象的时候,引用计数器的值就+1,引用失效的时候,计数器的值就-1, ...

  2. ASP.NET Core 中的日志记录

    目录 内置日志的使用 使用Nlog 集成ELK 参考 内置日志的使用 Logger 是 asp .net core 的内置 service,所以我们就不需要在ConfigureService里面注册了 ...

  3. 用java实现一个简易编译器-语法解析

    语法和解析树: 举个例子看看,语法解析的过程.句子:“我看到刘德华唱歌”.在计算机里,怎么用程序解析它呢.从语法上看,句子的组成是由主语,动词,和谓语从句组成,主语是“我”,动词是“看见”, 谓语从句 ...

  4. elasticSearch6源码分析(1)启动过程

    1.找到bin目录,下面有elasticSearch的sh文件,查看执行过程 exec \ "$JAVA" \ $ES_JAVA_OPTS \ -Des.path.home=&qu ...

  5. Node.js之Express一

    前面也了解了HTTP模块,但它并不支持session.cookie等.Express是对HTTP模块的封装,同时也支持session这些,使用起来也更好用.Express更有点像IIS服务器.它也是属 ...

  6. 008.在C#中,显式接口VS隐式接口

    原文http://www.codeproject.com/Articles/1000374/Explicit-Interface-VS-Implicit-Interface-in-Csharp (At ...

  7. 页面刷新 location.reload()

    * 页面不刷新,但是加了location.reload()后,把炒作失败提示语都刷没了.//成功,不提示,刷新看数据变化ajax success:function(res){ if(res.code= ...

  8. VFL使用

      关于界面布局约束的方法有很多,纯代码布局,可以使用官方原生布局(很繁琐).VFL.Masonary第三方等,在xib或者storyboard中也可以使用Autolayout的界面约束进行布局约束. ...

  9. SEDA架构程序实现

    一.SEDA SEDA全称是:stage event driver architecture,中文直译为“分阶段的事件驱动架构”,它旨在结合事件驱动和多线程模式两者的优点,从而做到易扩展,解耦合,高并 ...

  10. data whitening

    http://ufldl.stanford.edu/tutorial/unsupervised/PCAWhitening/