Questions tagged [timestamps]
timestamp is used for questions that are about data specifying seconds since the epoch (19700101T00:00:00) or possible some other standard, and also for (date) and time information in filenames.
586 questions
1
vote
1
answer
80
views
Set timestamp from exif for png files
Basically I am looking for the PNG-equivalent of jhead -ft *.jpg (which sets the timestamp of the file based on the exif time for JPG files).
So I have png files and want to set their timestamp to the ...
0
votes
2
answers
116
views
How to programmatically deduplicate files into hard links while maintaining the time stamps of the containing directories?
Continuing https://unix.stackexchange.com/a/22822, how to deduplicate files, given as a list, into hardlinks, while maintaining the timestamps of their directories? Unfortunately, hardlinks changes ...
8
votes
1
answer
2k
views
File has been changed, but its "date modified" is the same. How is that possible?
Here is a test file test.applescript:
display dialog "foo" buttons {"OK"} cancel button 1 default button 1
At 4:05 PM I compiled it to test.app:
osacompile -o test.app test....
0
votes
3
answers
264
views
How to show seconds of last modified date when using sftp command?
When I use WinSCP to access my SFTP server, it shows me the last modified (changed) date including seconds. If I use sftp on Linux and run ls -l, it only shows the hours and minutes, but no seconds. ...
4
votes
3
answers
1k
views
Is there a reason why I can't use find to scan modified files for viruses and malware?
I need to scan Linux systems for viruses/malware, on the entire file system. There are few options to consider.
One is normally what users do: Use antivirus to scan system once a day.
The second ...
0
votes
0
answers
165
views
Timestamp to each line of output (after finish command, how make view, when i input next command?)
In Terminal, i have see, when finish command, i view, when i input next command
I use this solution
https://unix.stackexchange.com/a/622928/675422
exec &> >( ts '%Y-%m-%d %H%M.%.S ' ) # ...
0
votes
1
answer
203
views
How to set keyboard shortcut to insert a timestamp (time & date) in KWrite?
KWrite is included as the default text editor in several popular Linux distros (such as Fedora KDE).
Inserting a timestamp is a basic feature of text editors.
How can one set a keyboard shortcut to ...
2
votes
2
answers
457
views
Dmesg showing incidents in the future
While debugging Wifi issues I came across this anomaly:
$ sudo dmesg -e
[Jul 1 14:28] wlxd85d4c93a47f: deauthenticating from 1c:57:3e:96:c3:a3 by local choice (Reason: 3=DEAUTH_LEAVING)
[ +1.457910] ...
31
votes
1
answer
3k
views
Can't set time to wee hours of January 1, 1970
This is related, but I believe not a duplicate, of "Why cannot I set the date of my GNU/Linux machines to the Epoch?".
I've discovered that one of my Linux kernels rejects attempts to set ...
-3
votes
2
answers
95
views
Explain to a beginner the meaning of -mtime in simple human language
Of course, I read the meager lines from the manual. I'm still interested in the specifics.
For example, the stat / some_files command
print this:
access 2024 (now)
modified 2022
changeded 2023
...
2
votes
3
answers
523
views
How to compare two directories recursively, and for each pair of files with the same name, location, and contents, say which file is older?
In a Linux shell, how to compare two directories recursively, and for each pair of files (including symlinks and directories) with the same location (including the name) in the two directories and the ...
35
votes
2
answers
4k
views
Why is filesystem time always some msecs behind system time in Linux?
In Linux, it seems that filesystem time is always some milliseconds behind system time, leading to inconsistencies if you want to check if a file has been modified before or after a given time in very ...
1
vote
1
answer
366
views
Add hours to the date and time
I have a requirement to add offset hours to the datetime value.
Get the previous date (e.g. 2023-10-19 00:00:00.000000)
previous_date=`TZ=TZ+24 date '+%Y-%m-%d 00:00:00.000000'`
Calculate the ...
0
votes
0
answers
340
views
SO_TIMESTAMPING: Which timestamp is used if we read multiple packets at once?
Given Linux is used and packet timestamping is enabled with SO_TIMESTAMPING for a TCP socket and we read now some data, what timestamp will be reported if the byte-stream which we read was merged out ...
1
vote
3
answers
394
views
How to call script with timestamps relative to now, on Solaris?
We have List Error shell script, but I run it manually daily. I want to run the script via crontab automatically.
My script :
#!/bin/sh
ent programe -a$1 -b$2 -c$3 -d$4 -tTE -oListErrorTE.txt
grep &...
4
votes
2
answers
3k
views
Why does this use of `cp -a` not preserve creation time?
I copy some directories with -a in order to preserve=all which I understood would include creation times:
cp -a ./* /mnt/destination/
When inspecting the resulting directories in the destination they ...
16
votes
1
answer
4k
views
The 01:00 in 1 January 1970 at 01:00
I will not ask why a timestamp is 1 January 1970 at 00:00 but in several cases in my computer they are 1 January 1970 at 01:00, how did the 01:00 coincidentally get set with a number of apps?
0
votes
2
answers
214
views
Unable to maintain createTime with rsync (but cp -p works)
I'm running into a strange issue with timestamps when trying to copy/backup files from my Mac to a shared drive on TrueNas.
My drive is defined in TrueNAS as a Home Share and mounted in MacOS via the ...
0
votes
1
answer
47
views
Getting year of Postixct format
"Thu Apr 21 11:15:00.375 2022" how to get the year of this expression?
Followings are tested.
1- as.POSIXct(strptime("Thu Apr 21 11:15:00.375 2022", format='%c'),origin='1970-01-01'...
0
votes
1
answer
74
views
Set explicit time with date
When I tried to set time with
$(date +%s -d "2022-04-10 12:12:12")
I get the time
2022-04-10 19:12:12
How can I set the time explicit?
4
votes
3
answers
1k
views
Converting epoch time format saved in a text file to human friendly format
I have a file name simcloud-target.txt where dates are saved in epoch time format i want to convert all the dates to human friendly format and print it as a list (same as the out put shown below so ...
3
votes
3
answers
2k
views
Convert Xorg log timestamps to human readable timestamps
I need to change the time stems of a whole Xorg/X11 log file (e.g. /var/log/Xorg.0.log) into human readable format. The default format is the time in seconds since boot, preferably yyyy-mm-dd + time. ...
0
votes
1
answer
795
views
Use awk to change timestamp on column from the ISO 8601 format
I have an output like this:
echo "$i"
**@timestamp:** `2023-01-18T15:08:36.698Z`
I would like to output this in awk and make it look like this:
Wed 18 Jan 2023 06:50:38 PM EST
Here's what I ...
0
votes
1
answer
145
views
Journald and Sources of Log Messages
I would like to know what process is meant to write Timestapms (and other parts of Log messages) in Syslog protocol.
In other words, is it Syslog that sets timestamp of log message (exact time of ...
1
vote
2
answers
126
views
Interpolate timestamps and replace empty fields in CSV files
I have CSV files with the following elements:
timestamp, data1, data2, data3, data4, data5
2015-03-16 00:00:00, 3, 3, 4, 2, 5
2015-03-16 00:10:00, 4, 7, 8, 9, 3
2015-03-16 00:20:...