Change the access time of file.txt. The modification timeis not changed. The change time is set to the current system time. If file.txt does not exist, it is created.
[root@academy F1]# stat file.txtFile:‘file.txt’Size:0Blocks:0IOBlock:4096regularemptyfileDevice:fd00h/64768dInode:17214607Links:1Access: (0644/-rw-r--r--) Uid: ( 0/root) Gid: ( 0/root)Context:unconfined_u:object_r:user_tmp_t:s0Access:2023-12-2216:47:23.170912561+0330Modify:2023-12-2216:47:23.170912561+0330Change:2023-12-2216:47:23.170912561+0330Birth:-[root@academy F1]# touch -a file.txt[root@academy F1]# stat file.txtFile:‘file.txt’Size:0Blocks:0IOBlock:4096regularemptyfileDevice:fd00h/64768dInode:17214607Links:1Access: (0644/-rw-r--r--) Uid: ( 0/root) Gid: ( 0/root)Context:unconfined_u:object_r:user_tmp_t:s0Access:2023-12-2216:56:01.079909026+0330Modify:2023-12-2216:47:23.170912561+0330Change:2023-12-2216:56:01.079909026+0330Birth:-[root@academy F1]#
Change the access and modification times of file-b.txt to match the times of file-a.txt. The change time will be set to the current system time. If file-b.txt does not exist, it is not created. Note, file-a.txt must already exist in this context.