A saída que você postou explica o formato desmembrando os números como (03 20 1600):
03 - March
20 - 20th
1600 - 4:00 PM (24-hour clock, where 0000 is midnight)
Ao ler sobre o Linux, recebi o seguinte:
touch provides several options, but here is one of interest:
The -t option allows you to set the date and time stamp of the file. To set the time stamp to a specific time:
$ touch -t 03201600 myfile
This sets the file, myfile's, time stamp to 4 p.m., March 20th (03 20 1600).
Aqui, não estou obtendo a lógica por trás do 03201600 - > 16h, 20 de março.
A saída que você postou explica o formato desmembrando os números como (03 20 1600):
03 - March
20 - 20th
1600 - 4:00 PM (24-hour clock, where 0000 is midnight)
Bem-vindo ao Linux! Você provavelmente leu o texto touch
citado em sua pergunta em um guia ou livro.
No Linux, quase todo comando tem um "manual" que explica suas opções. Você pode visualizar a página de manual de qualquer comando executando man <command>
em uma máquina Linux.
Então, no comando man touch
:
-t STAMP
use [[CC]YY]MMDDhhmm[.ss] instead of current time
Então, seu exemplo:
-t 03201600 #Breaking it down: -t 03 20 16 00 -t MM DD hh mm -t month day hours minutes
Então, 20 de março, 16h (formato de 24 horas).
Se você não tem acesso a uma máquina Linux, pode ver estas man
páginas online aqui: link . A página man
do comando touch
é encontrada aqui: link
A timestamp is the current time of an event that is recorded by a computer.
Timestamps are employed extensively within computers and over networks for various types of synchronization. For example, they are assigned to packets in some network protocols in order to facilitate the reassembly of the data (e.g., human speech) in the proper sequence by the receiving host (i.e., computer). Also, they are used by database management systems (DBMS) to determine the transaction order in the event of a system failure (e.g., a computer crash caused by a loss of electrical power or disk failure).
Timestamps are also routinely used to provide information about files, including when they were created and last accessed or modified. This information is included in the inode, which is a data structure on a file system on a Unix-like operating system that stores all the information about a file except its name and its actual data.
Another important application is events that are recorded in system log files. The timestamps in such files can be extremely useful for monitoring system security and for forensic purposes.
The time as recorded by timestamps can be measured in terms of the time of day or relative to some starting point. And it is measured with high precision in small fractions of a second.
The accuracy of the time is maintained through a variety of mechanisms, including the high-precision clocks built into computers and the network time protocol (NTP). NTP uses coordinated universal time (UTC) to synchronize computer clock times to a millisecond (and sometimes to a fraction of a millisecond) and uses UDP (user datagram protocol), one of the core Internet protocols, as its transport mechanism.Timestamp
Clique aqui para converter
Tags timestamp