Questions tagged [timestamp]

The time at which an event is recorded by a computer.

Covers file creation/modification dates and times (eg: 12/12/12 12:12 Text.log as might show in response to a DOS DIR command) and event times (eg: 2012-10-18 06:40:03,582 INFO hello as might be an entry within a log file). Also covers timecodes for synchronisation purposes, such as used in video production.

See Wikipedia.

228 questions
113
votes
3 answers

How can I copy a file in Unix without altering its last modified time?

If I copy some file from some place to another using cp, the timestamp on the copied file is set to the time of the copy. Is there some way to avoid this? I need to copy files without altering their timestamps.
Lazer
  • 18,407
103
votes
5 answers

How can I change the timestamp on a file?

Possible Duplicate: How to modify timestamp in a dll or exe? Windows equivalent of the Linux command 'touch'? How can I set the timestamp for a file via the command-line to a specific date? My specific situation is Windows 7.
87
votes
2 answers

How to check all timestamps of a file?

Is there a command in Linux to check all timestamps of a file? I'm trying to see the last modified, created, and touched dates on the file.
Anthony Miller
  • 1,694
  • 4
  • 17
  • 23
43
votes
6 answers

Determine when Windows was installed on a computer

Is it possible to check the date when Windows was installed on a PC and if so how?
41
votes
1 answer

Why is cat not changing the access time?

Calling cat a second time on a file doesn't update its access time. I was expecting the access time to be updated every time a file's contents get displayed. I see the same behaviour if I open the file in a web browser. Its access time does not get…
nelaaro
  • 14,139
  • 30
  • 88
  • 115
41
votes
4 answers

How to display Unix time in the timestamp format?

I'm looking for a way to display my time in Debian Linux as a timestamp, e.g. 1279628325 I can't find any options to do that with the date command. Any ideas?
user32433
  • 467
26
votes
2 answers

What is this 14-digit time format from Windows registry?

Microsoft Office 365 saves information in the registry about what time it last searched/downloaded/applied updates in a format like this: Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\office\ClickToRun\Updates' | select…
Cpt.Whale
  • 10,914
26
votes
5 answers

What is the "Date" column in Windows 7 explorer? It matches no date column from Windows XP explorer

I can't get myself to understand what the default "Date" column in Windows 7 Explorer is. It's not the creation date really and it's not the modified date ... What is it? Anyone knows what Microsoft had in mind with this other than trying to…
Notitze
  • 1,186
24
votes
4 answers

How to compare file timestamps in bash?

How do I compare the timestamp of two files? I tried this but it doesn't work: file1time=`stat -c %Y fil1.txt` file2time=`stat -c %Y file2.txt` if[$file1time -gt $file2time]; then doSomething fi I printed both the time stamps, in order and it…
newcoderintown
  • 349
  • 1
  • 2
  • 4
23
votes
2 answers

FFmpeg: recreate timestamps without reencoding

I have an MP4 file containing H264 video (25 FPS). Some timestamps are not correct (for reasons...). Can I process the file and have only the timestamps regenerated without reencoding? I've tried this ffmpeg -r 25 -i infile -c copy outfile but the…
user674865
22
votes
1 answer

Preserve ctime with SCP

How can I copy a file using SCP while preserving ctime (modification time)? I have a folder on my Mac (OS 10.8), and the results of ls -l and ls -lc are the same. $ ls -l total 0 drwxr-xr-x 9 elliott staff 306 Mar 24 21:24 Day1b $ ls -lc total…
Elliott B
  • 1,347
  • 5
  • 17
  • 44
22
votes
3 answers

Are there any negative effects of disabling the Last Access timestamp?

In Windows, you can disable the last accessed timestamp by setting NtfsDisableLastAccessUpdate to 1, for instance by executing this from the command line (the computer must be restarted before it takes effect): fsutil behavior set disablelastaccess…
Eric L
  • 1,492
19
votes
5 answers

Are Windows file timestamps timezone aware?

I have a file that was modified either before or after it was sent to me. However, it was created in a different time zone, so if the modification date is in the timezone of the sender, he was the last to modify it. If it is in my timezone, I…
bastibe
  • 3,912
17
votes
3 answers

Is it possible to determine when a NTFS partition was created?

We have a client where it would be very useful to determine WHEN a drive was a initialized or an NTFS partition created. Is there a timestamp value somewhere? If anyone could shed any advice it would be greatly appreciated. Thanks! -slashp
cjones26
  • 725
15
votes
1 answer

Avoid errors from tar failing to restore directory permissions

I observe the following behavior with both tar 1.26 and 1.27.1: $ mkdir a b a/diffowner $ sudo mkdir b/diffowner $ sudo chmod a+w b/diffowner $ echo foo > a/diffowner/foo $ tar -C a -cvf test.tar diffowner diffowner/ diffowner/foo $ tar -C b -xvf…
MvG
  • 1,519
1
2 3
15 16