Questions tagged [date]
the "date" tag is used to classify questions about date/calendar/time manipulation, visualisation, conversion... on Unix-like systems.
1,196 questions
10
votes
2
answers
936
views
How to portably find file modified less than 10 minutes ago
Context: I want to process a file created by another program, but the name of its output file is not completely under my control, so to find its output I use find to find all files in the output ...
0
votes
1
answer
64
views
Why `date -d` doesn't respond to change of `LC_TIME` variable
In KDE System Settings locale is UK apart from keyboard layout, which is Italian.
For some reason, this is the output of the locale command:
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
...
-8
votes
2
answers
98
views
Are vlc, mpv spying on me?
During the Christmas season the icons for vlc and mpv change. A red Christmas cap is placed on the left/right side of each icon.
How do these programs know it's Christmas? Is there some function in ...
13
votes
2
answers
2k
views
What is that "T" in the pattern string of the date-command?
What is that "T" in the pattern string of the date-command?
While there is decent information about the output format string, I can only find unexplained examples for the pattern string ( ...
3
votes
2
answers
237
views
Get all log lines from last minute with busybox
I have an openwrt router (so no journalctl and only busybox commands), and would like to extract the logs from the last minute.
The logs are like this:
Tue Jun 3 11:06:43 2025 authpriv.info dropbear[...
3
votes
1
answer
298
views
Help needed for command to avoid leading zero in month part
We are using command
find $$dirpath_err -maxdepth 1 -type f -name "*XYZJPQ*_"`date +%m_%d_%Y`"*standard_error.csv"
but the file is generated as ...
0
votes
1
answer
167
views
What output does --iso-8601=ns provide with the date command?
This command will output the following:
date --iso-8601=ns
2025-04-04T12:10:16,045431370+02:00
According to man date the ns is documented as follows:
-I[FMT], --iso-8601[=FMT]
output date/time in ...
0
votes
2
answers
150
views
time in bash prompt does not change over time
I changed the prompt in my .bashrc to show the current time. This was the original prompt (from a fresh MX Linux install)
PS1="$PURPLE\u$nc@$CYAN\H$nc:$GREEN\w$nc\\n$GREEN\$$nc "
and I ...
3
votes
2
answers
445
views
How to compare two dates in formats %Y-%m-%dT%H:%M:%S.%3NZ and %-m/%-d/%Y %-I:%M %p
This is a bash date conversion/comparison question.
How do I compare dates $d1 and $d2 below where:
$d1 has format %-m/%-d/%Y %-I:%M %p (US-style %p with AM/PM)
and
$d2 has format %Y-%m-%dT%H:%M:%S.%...
2
votes
1
answer
220
views
Locale: Unable to get correct date (for Sunday of this week)
I did the following yesterday night (before midnight of Sunday in Germany):
Today's date
$ LC_TIME="en.GB.UTF8" date --iso-8601
2025-01-12
Today's date (day of the week
$ LC_TIME="en....
0
votes
3
answers
357
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
1
answer
406
views
ISO 8601 intervals in date arithmetic with date command
I can make some date arithmetic with date command like
$ date -u -d '3 days 2024-12-01T00:00:00Z' +%FT%H:%M:%SZ
2024-12-04T00:00:00Z
$
The date command can parse quite a lot of date formats, ...
1
vote
2
answers
114
views
Can any Linux date command print the current time in a time zone other than the current?
I want the just the current time in HH:MM (%R or %H:%M in strftime) in a time zone other the my system's.s
Is this possible with just the date command, and if so, how?
0
votes
2
answers
236
views
speedtest cli with cron and date
I would like a cron job running every hour for speedtest cli and to log it to csv file with time and date (https://www.speedtest.net/apps/cli). So I can run it this way
0 * * * * speedtest -p no -f ...
0
votes
1
answer
83
views
adding alternate date (e.g., julian) to Gnome panel
Is there an extension which would allow me to add an additional date (Julian) to the Gnome panel?