linux 文件类型
来源:互联网 发布:梦幻网络盟重新城 编辑:程序博客网 时间:2024/06/04 18:32
linux 的文件类型主要有以下几种,在用ls -l显示
-:普通文件
l:连接文件
c:字符设备
d:目录
b:块文件
p:管道文件
s:socket文件
除了用ls -l可以查看文件类型外在shell编程中还常用stat 命令来方便的取出文件各种属性值,
1. 所有属性
[root@hadoop ~]# stat go4.txt
File: `go4.txt'
Size: 11 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 675874 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2014-02-14 01:47:02.196043596 -0500
Modify: 2013-09-29 01:38:17.809000173 -0400
Change: 2013-09-29 01:38:17.809000173 -0400
2. 只列出修改日期
[root@hadoop ~]# stat -c %y go4.txt
2013-09-29 01:38:17.809000173 -0400
3.只列出文件类型
[root@hadoop ~]# stat -c %F go4.txt
regular file
更细的可以使用file命令
0 0
- linux文件类型
- linux文件类型
- Linux文件类型
- Linux文件类型
- LInux文件类型
- linux:文件类型
- Linux文件类型
- Linux文件类型
- linux 文件类型
- LINUX文件类型
- linux文件类型
- linux文件类型
- Linux 文件类型
- Linux-文件类型
- linux 文件类型
- Linux文件类型
- linux 文件类型
- linux文件类型
- python 时间
- Java读取xml文件
- C++ Primer总结与内容拓展(第二章)
- IOS开发之—程序截图
- 【转】从猎头角度推测,搜狗的买卖对于互联网格局和薪水的影响
- linux 文件类型
- android网络开源框架volley(四)——谈谈图片加载
- d3学习之(Data Visualization with d3.js Cookbook )(第三章)-2
- 咖啡精神科
- 都不会笔直向前,总有崎岖泥泞,总有坎坷艰辛。
- OCI--学习OCI编程
- 【Chapter 6 Routing】.The Book for Symfony 2.4 第六章 路由(Routing)
- 串(2)--模式匹配算法
- mongo update