That's an excellent follow-up question! To view file timestamps, you can use the ls command with specific options.
The most common way to do this is with the -l and -t or -u options:
-
ls -l(long listing format): This command shows a lot of information about files and directories, including their permissions, ownership, size, and the last modification time.ls -l example.txt -
ls -lu(last access time): To specifically show the last access time (when the file was last read or opened), you can use the-uoption with-l.ls -lu example.txt -
statcommand: For even more detailed information, including all three timestamps (access, modify, and change), thestatcommand is extremely useful.stat example.txt
Try one of these commands on the example.txt file you just created or touched, and you'll see how the timestamps are displayed!