Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
59 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] ...
dotancohen's user avatar
  • 16.1k
0 votes
1 answer
56 views

How do I change the date/time format in syslog-ng from `mmm [d]d hh:mm:ss` to `yyyy-mm-dd hh:mm:ss`?

I noticed that the default datetime format for logs in /var/log/messages is mmm [d]d hh:mm:ss, for example: Jan 4 03:46:50 1.2.3.4 ntpclient[6952]: Failed resolving address to hostname pool.ntp.org: ...
skeetastax's user avatar
30 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 ...
Steve Summit's user avatar
18 votes
6 answers
7k views

How does a Linux operating system stand going back in time (when applying winter time for example)? Going back a second, would it be the same problem?

I'm asking myself after having read on papers that around the year 2035, we, on the earth and our computers by the way, might have to correct our time by one second back to comply with astronomical ...
Marc Le Bihan's user avatar
-3 votes
2 answers
61 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 ...
alex099's user avatar
  • 17
2 votes
6 answers
567 views

Convert EPOCH string in filename to readable format

My knowledge of Unix is not very good. I'm trying to write a shell script to rename a set of files in a directory, like 1709532255.mp4 to 20240304_070415.mp4, where 1709532255 is always an epoch time. ...
tom's user avatar
  • 23
2 votes
3 answers
240 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 ...
AlMa1r's user avatar
  • 1
0 votes
1 answer
32 views

fixing metadata if destination file is younger than source file

I guess the question first has to learn from your comments, before it grows into a grown-up question. Here is the tricky situation: I have a folder destination with many files (pdfs), that, ...
ingli's user avatar
  • 1,889
35 votes
2 answers
3k 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 ...
Alberto Pianon's user avatar
1 vote
2 answers
1k views

How can I delay a systemd service startup until network and ntp time synchronization is accomplished?

I have an issue on my Linux home server, which doesn't export its NFS shares properly, possibly because the NFS services are started too early, when the network services are not fully synced. A ...
user333869's user avatar
1 vote
1 answer
184 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 ...
Pixel's user avatar
  • 11
0 votes
0 answers
29 views

What environment variables should I track to explain a 10 minutes difference on a timestamp sent by a front application and received by a backend one?

Two Linux computers, I'm not knowing yet their exact settings, are running: A front application, for the first A backend application, for the second I face the trouble that what the backend receives,...
Marc Le Bihan's user avatar
0 votes
0 answers
48 views

SO_TIMESTAMPING: Overhead?

I use SO_TIMESTAMPING with SOF_TIMESTAMPING_RX_SOFTWARE to generate software timestamps for TCP and UDP streams. Is it known what's the overhead for using this flag? Does the throughput or the latency ...
Kevin Meier's user avatar
0 votes
0 answers
123 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 ...
Kevin Meier's user avatar
2 votes
0 answers
56 views

How to cancel a packet scheduled for time-based transmission after it's enqueued?

I have a time-sensitive networking application I am writing that involves receiving individual Ethernet frames, and then sending the data onward in another Ethernet frame after a precise 1 second ...
AJMansfield's user avatar
1 vote
3 answers
310 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 &...
SLALOMS's user avatar
  • 11
0 votes
1 answer
262 views

How to preserve file creation date when overwriting files?

When I'm overwriting one file with another one, not only it's modification time updates, but also birth time, which is unwanted. I want to make Dolphin overwrite files that way, so target's birth time ...
Velent's user avatar
  • 39
3 votes
2 answers
1k 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 ...
Andreas's user avatar
  • 521
0 votes
0 answers
30 views

Showing the Creation date of a File [duplicate]

I guess there's no way to get that under most Linux flavors, please correct me if I'm wrong. My hack is to go up a directory level and get the info and the directory containing the file I'm ...
user13574's user avatar
16 votes
4 answers
3k views

date - Can't Go Back More Than 115 Years or Can't Go 5879565 Years Into the Future

TimeZone = CEST date (GNU coreutils) 8.32 date -d "115 years ago" Di 11. Aug 13:37:54 CET 1908 date -d "116 years ago" date: invalid date ‘116 years ago’ Questions Is it ...
Bog's user avatar
  • 1,034
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?
Niklas Rosencrantz's user avatar
1 vote
3 answers
201 views

How to change modification date for files in dir to match name order?

This is a self answered question for something others also might find useful. In Dolphin, I sometimes switch between sorting by name and sorting by modification date. However, it can be annoying since ...
klutt's user avatar
  • 544
0 votes
2 answers
80 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 ...
Eric B.'s user avatar
  • 645
0 votes
0 answers
422 views

How accurate is the PPS device?

I am doing research in timing synchronization, and want to measure how time synchronization is impacted by injecting various faults into a system. I understand that the PPS devices on linux machines ...
stochasticlover1's user avatar
0 votes
1 answer
26 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'...
Fkiran's user avatar
  • 3
25 votes
4 answers
8k views

Should I (still) use UTC for all my servers?

My employer is located in Europe (CET), and therefore we use daylight saving time, which requires shifting an hour hence and forth twice a year. Our servers are running in the cloud in different ...
Patrick Bucher's user avatar
0 votes
1 answer
51 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?
Timestamp's user avatar
2 votes
1 answer
293 views

Why is atime updating when equal to mtime and ctime?

I'm trying to understand how inode access time is handled with the default "relatime" mount option in Linux, but the behavior documented in mount(8) doesn't quite match what I see. It says: ...
epiii2's user avatar
  • 23
4 votes
3 answers
858 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 ...
saifi rahman's user avatar
1 vote
0 answers
156 views

How to change birth/creation time without copy the whole file?

In Btrfs, stat a file will show birth time, which I try to change but find the method is always about copying the whole file, that would be a time waste, it'd be good to change it like access, modify, ...
user551324's user avatar
2 votes
1 answer
1k 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. ...
Sebastian DonnerWolfBach's user avatar
1 vote
0 answers
73 views

Listing 'at' jobs with custom time format

Hello I need to list 'at' jobs with the following format "year-month-day hours:minutes:seconds". From the 'at' man page the synopsis I need is the following: at [-V] -l [-o timeformat] [job ...
Centuri0n's user avatar
0 votes
1 answer
507 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 ...
mimisashi's user avatar
8 votes
1 answer
624 views

Deleting a hard link's tail file changes the change time of the head or vice versa. Why?

Note: Question although says vice versa but it really does not have any meaning since both of them point to the same inode and its not possible to say which is head and which is tail. Say I have a ...
Himanshuman's user avatar
0 votes
1 answer
107 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 ...
GabrijelOkorn's user avatar
1 vote
1 answer
688 views

Understanding timestamps in a GNU Parallel --joblog output

Does GNU Parallel start a batch of as many jobs as possible (the number of jobs started being governed by GNU Parallel internals or/and the -j option along with given parameters), and once complete, ...
Nikos Alexandris's user avatar
1 vote
2 answers
89 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:...
dante_t's user avatar
  • 151
2 votes
1 answer
1k views

when will a Y2K time overflow problem happen in modern 21st century Linux?

referencing Why does Unix time start at 1970-01-01? An answer mentioned The end of Unix Time will occur on January 19, 2038 03:14:07 GMT. On January 19, 2038 03:14:08 GMT all computers that still use ...
ron's user avatar
  • 7,162
2 votes
2 answers
4k views

How to convert a Timestamp to Unix Epoch time using Bash

I have a timestamp similar to this: 2022-11-09T14:41:15.555641007Z I would like to convert this to Unix epoch time in seconds like this: 1668005090 How can I achieve this using bash?
Mayur Raiturkar's user avatar
0 votes
1 answer
222 views

How can get the time variable's timestamp?

In my os date Tue 01 Nov 2022 06:58:10 PM HKT Get unix timestamp date +%s 1667300297 Get the utc time. date -u Tue 01 Nov 2022 10:58:08 AM UTC If i assign a variable as a UTC time x=$(date -u) How ...
newview's user avatar
  • 205
0 votes
1 answer
500 views

`cat` affects last `Access` time but not last `Change` time

On my Ubuntu system, I've created a new file prueba.txt using touch prueba.txt. When I show its file statistics using stat prueba.txt, the output is as follows: File: prueba.txt Size: 0 ...
Franklin Pezzuti Dyer's user avatar
4 votes
1 answer
3k views

Copy a file and preserve its creation date

I need to copy files and preserve all their metadata, including creation date. I found ways to use rsync options to preserve modification date, but I also need the creation date to be the same, and ...
QDelage's user avatar
  • 41
3 votes
2 answers
2k views

How to rename multiple files with the time created?

#!/bin/sh for f in *.png do echo mv -n "$f" "$(date +%Y%m%d-%H-%M-%S)_$f" done I want to rename several files with their timestamp as stated in (ls -lt --full-time), but I run ...
qwerty's user avatar
  • 29
0 votes
1 answer
256 views

Update only permissions etc. with rsync

I'd like to know if the following scenario will update permissions, ownership, timestamps etc. Say I transfer a folder from a destination to another using rsync -zr source/ dest/, and then use the ...
telometto's user avatar
  • 2,055
0 votes
1 answer
237 views

Access time strangeness

According to the mount man page, Access time is only updated if the previous access time was earlier than the current modify or change time. However if I do this (ext4 with relatime option(*)): > ...
xenoid's user avatar
  • 9,018
1 vote
1 answer
194 views

After enabling ETF qdisc packets are only sent for a few seconds

I have two computers that are connected via an Ethernet cable with Ubuntu 22.04 installed on them. I have a client on computer A) which is sending UDP packets to a server on computer B). I am ...
Nandor Takacs's user avatar
2 votes
2 answers
2k views

Script - Compare filename date with current date

I'm trying to compare a file with date in its name to the current datetime of the system: Filenames are with the following format: FileName.yyyymmdd.hhmm.file (e.g. File156tr.20220914.0958.txt) I have ...
joniop's user avatar
  • 51
1 vote
1 answer
318 views

File timestamps on different OSes

Are file timestamps (Created/birth, accessed and modified) the same on different OSes? Particularly on Windows and Linux. I downloaded a file which is modified on Windows and its timestamps looked ...
Pverpa's user avatar
  • 11
1 vote
3 answers
64 views

Impossible modified dates

I was listing the last modified files in the root directory and found something interesting regarding some dates, so I would like to know the reason behind it. I know that you can easily modify the &...
Lucius's user avatar
  • 101
-2 votes
2 answers
135 views

Real Time clock regarding timestamp storage

I gone through some of the datasheet regarding RTC like MCP79411X, but having confusion like where RTC stores timestamp in sram or eeprom, can anyone explain me the flow of the below fig suppose ...
Sukanya U's user avatar

1
2 3 4 5
12