touch命令 – 创建文件
| | --version | 列出版本讯息 | **参考实例** 创建空文件: ``` [root@anycode ~]# touch file.txt ``` 批量创建文件: ``` [root@anycode ~]# touch file{1..5}.txt [root@anycode ~]# ls file1.txt file2.txt file3.txt file4.txt file5.txt ``` 修改文件的access(访问)时间: ``` [root@anycode ~]# stat file.txt File: file.txt Size: 0 Blocks: 0 IO Block: 512 regular empty file Device: 2h/2d Inode: 87538717757135273 Links: 1 Access: (0666/-rw-rw-rw-) Uid: ( 1000/ root) Gid: ( 1000/ root) Access: 2019-04-07 00:25:34.729216500 +0800 Modify: 2019-04-07 00:25:34.729216500 +0800 Change: 2019-04-07 00:25:34.729216500 +0800 Birth: - [root@anycode ~]# touch -a file.txt [root@anycode ~]# stat file.txt File: file.txt Size: 0 Blocks: 0 IO Block: 512 regular empty file Device: 2h/2d Inode: 87538717757135273 Links: 1 Access: (0666/-rw-rw-rw-) Uid: ( 1000/ root) Gid: ( 1000/ root) Access: 2019-04-07 00:26:13.004116000 +0800 Modify: 2019-04-07 00:25:34.729216500 +0800 Change: 2019-04-07 00:26:13.004116000 +0800 Birth: - ```