linux常用命令(十)

 时间:2026-04-23 10:04:32

1、stat:查看文件或者文件系统的状态 

[root@shell ~]# stat /etc/profile

  File: `/etc/profile'

  Size: 1960            Blocks: 8          IO Block: 4096   regular file

Device: 803h/2051d      Inode: 916149      Links: 1

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

Access: 2019-08-12 21:11:20.351122580 +0800

Modify: 2018-04-27 00:29:06.486815851 +0800

Change: 2018-04-27 00:29:06.488815797 +0800

linux常用命令(十)

2、参数

-c :格式化

%a : 查看文件属性

[root@shell ~]# stat -c %a /etc/hosts

644

linux常用命令(十)

3、%Y 按时间戳格式成时间戳

[root@shell ~]# stat -c %Y /etc/hosts

1263302902

[root@shell ~]

linux常用命令(十)

4、seq命令

用于以指定增量从首数开始打印数字到尾数,即产生从某个数到另外一个数之间的所有整数,并且可以对整数的格式、宽度、分割符号进行控制

产生5以内的整数

[root@shell ~]# seq 5

1

2

3

4

5

linux常用命令(十)

5、输出0-10的整数,增量为2

[root@shell ~]# seq 0 2 10

0

2

4

6

8

10

linux常用命令(十)

6、输出5-10之间的整数,要求宽度一致

[root@shell ~]# seq -w 5 10

05

06

07

08

09

10

linux常用命令(十)

7、不换行输出1-5的序列

[root@shell ~]# seq -s " " 5

1 2 3 4 5

linux常用命令(十)

  • linux常用命令
  • linux之常用命令
  • linux常用命令?
  • Linux apache服务常用命令
  • linux常用命令(三)
  • 热门搜索
    脚踝扭伤怎么办 怎么踢足球 雷诺手表怎么样 豆沙馅怎么做 林内热水器怎么样 张惠妹怎么突然胖了 燮字怎么读 qq怎么查看特别关心我的人 高尔夫怎么打 新生儿不吃奶怎么办