通过date命令创建日期格式的file

[wanggaoli@WangGaoli:] ~ $ echo `date +%F`
2022-06-16
[wanggaoli@WangGaoli:] ~ $ touch file.txt
[wanggaoli@WangGaoli:] ~ $ cp file.txt file.txt.`date +%F`
[wanggaoli@WangGaoli:] ~ $ ls -l file.txt*
-rw-r--r--  1 wanggaoli  staff  0  6 16 16:53 file.txt
-rw-r--r--  1 wanggaoli  staff  0  6 16 16:53 file.txt.2022-06-16
[root@localhost ~]# date
Fri Apr 14 23:26:05 EDT 2006 //EDT (美国)东区时区

[root@localhost ~]# date -s 2011/9/30
Fri Sep 30 00:00:00 EDT 2011
[root@localhost ~]# date -s 14:18
Fri Sep 30 14:18:00 EDT 2011
[root@localhost ~]# date
Fri Sep 30 14:18:01 EDT 2011
[root@localhost ~]# hwclock -w