touch命令除了创建文件外,还可以修改文件时间戳
[root@localhost Desktop]# touch file1 file2 file3
[root@localhost Desktop]# ll
total 4
drwxr-xr-x. 2 root root 4096 Mar 31 20:27 20220401之前
drwxr-xr-x. 2 root root 36 Apr 5 20:28 20220406
-rw-r--r--. 1 root root 0 Apr 5 20:29 file1
-rw-r--r--. 1 root root 0 Apr 5 20:29 file2
-rw-r--r--. 1 root root 0 Apr 5 20:29 file3
[root@localhost Desktop]# touch -t '200007280728' file1 file2
[root@localhost Desktop]# ll
total 4
drwxr-xr-x. 2 root root 4096 Mar 31 20:27 20220401之前
drwxr-xr-x. 2 root root 36 Apr 5 20:28 20220406
-rw-r--r--. 1 root root 0 Jul 28 2000 file1
-rw-r--r--. 1 root root 0 Jul 28 2000 file2
-rw-r--r--. 1 root root 0 Apr 5 20:29 file3
[root@localhost Desktop]# touch file4
[root@localhost Desktop]# touch -t '196912312359' file4
[root@localhost Desktop]# ll
total 4
drwxr-xr-x. 2 root root 4096 Mar 31 20:27 20220401之前
drwxr-xr-x. 2 root root 36 Apr 5 20:28 20220406
-rw-r--r--. 1 root root 0 Jul 28 2000 file1
-rw-r--r--. 1 root root 0 Jul 28 2000 file2
-rw-r--r--. 1 root root 0 Apr 5 20:29 file3
-rw-r--r--. 1 root root 0 Dec 31 1969 file4
touch -r file1 file4 是指将file4的时间和file1同步
[root@localhost Desktop]# touch -r file1 file4
[root@localhost Desktop]# ll
total 4
drwxr-xr-x. 2 root root 4096 Mar 31 20:27 20220401之前
drwxr-xr-x. 2 root root 36 Apr 5 20:28 20220406
-rw-r--r--. 1 root root 0 Jul 28 2000 file1
-rw-r--r--. 1 root root 0 Jul 28 2000 file2
-rw-r--r--. 1 root root 0 Apr 5 20:29 file3
-rw-r--r--. 1 root root 0 Jul 28 2000 file4
当使用vim左右模式打开两个文件时,该如何切换
【:tabn】【:tabp】【:n】【:N】