Linux——文件内容如何查看

touch stat du

stat查看文件状态信息

[root@fengdeyong lianxi]# stat hejin.txt

  File: hejin.txt

  Size: 0                 Blocks: 0          IO Block: 4096   regular empty file

Device: fd00h/64768d        Inode: 52727069    Links: 1

Access: (0644/-rw-r–r–)  Uid: (    0/    root)   Gid: (    0/    root)

Context: unconfined_u:object_r:default_t:s0

Access: 2021-03-28 10:31:12.989701564 +0800

Modify: 2021-03-28 10:17:21.719671835 +0800

Change: 2021-03-28 10:17:21.719671835 +0800

Birth: –

        linux里的文件有3个时间

        1.access time –》atime 访问时间  –》你查看了文件里的内容   vim,cat

        2.change time –》ctime 改动时间 –》改动了文件的属性,  例如用户,组,权限,大小,时间,文件名等

        3.modify time  –》mtime 修改时间 –》修改文件里的内容


touch命令(新建空文件,或更新文件时间标记)

touch file 新建空文件


du -sh dicr1(查看文件或文件夹的占用情况)

du –> disk usage

-sh –> summarize human-readable

遇到结束的进程,无法访问怎么办?

du -sh / 2>/dev/null  出错的信息不显示杂屏幕上,重定向到/dev/null

2> 错误信息重定向

 

0

评论0

请先
显示验证码
没有账号?注册  忘记密码?