The date tag has no wiki summary.
0
votes
2answers
27 views
date: cannot set date: Operation not permitted [duplicate]
I have received an interesting problem during I tried to set my Server time either with NTD or manually using date command.
First of all I have tried to use NTD. I have succesfully installed the ...
9
votes
1answer
171 views
How do I make cron run every other Sunday on the OTHER Sunday?
I have a cron job that runs at 0 0 * * 0/2 -- i.e. every other Sunday. It just ran now, for instance. However, I want it to run on the other Sundays -- next Sunday, rather than this one. Another ...
1
vote
1answer
35 views
Linux date translation to different time zone
The Linux server is hosted in EST timezone. But I want to translate the output of date command to IST(Indian Standard time +5:30 hrs) format and use it in a shell script. Is there any option available ...
0
votes
2answers
71 views
ntpdate wrong date
Hi all I have an ubuntu8 server where I have problems with date.
My current date (Europe/Rome) is 9:35
If I do date print me 11:12:34
I have seen my ntp.conf is:
server 0.ubuntu.pool.ntp.org
...
0
votes
0answers
328 views
Member Status: Inquorate in RHEL 5.6
I've encountered a strange issue.
I had to change the time on my Linux RHEL cluster system. I've done it using the following command from the root user:
date +%T -s "10:13:13"
After doing this, ...
3
votes
5answers
4k views
ntpdate not updating system time in XenServer VM
We have a Debian webserver that I am trying to use ntpdate to keep the time in sync.
When I run
ntpdate ntp0.cs.mu.oz.au
I receive
16 Sep 10:55:36 ntpdate[21626]: step time server 128.250.36.2 ...
0
votes
1answer
61 views
Debian date jumping, causing complete lockup
I have a Debian Squeeze VM that has suddenly chosen to jump it's date forwards just over a month, which seems to confuse it no end and cause it to require a hard reset (yikes!).
There is nothing ...
0
votes
12answers
20k views
Finding day of week in batch file? (Windows Server 2008)
I have a process I run from a batch file, and i only want to run it on a certain day of the week.
Is it possible to get the day of week?
All the example I found, somehow rely on "date /t" to return ...
0
votes
1answer
68 views
replace dates in XML file on a Linux server
I'd like to change the date format in the contents of an XML file from 2013-01-21 to January 21
The following script works on my mac, but not on a linux server (I'll be running it as a daily cron ...
1
vote
1answer
205 views
SFTP files not showing upload date as last modification time
Some of the files we receive on our Redhat server are showing date different from upload date as the last modification time. For us the modification time is important as we classify files depending on ...
2
votes
4answers
586 views
How to determine number of week of the month
On the Linux CLI, is there a way to get the number of the week of the month? Maybe there is another way to get this with one simple (like date) command? Let's say that day 1 to 7 is the first week, ...
-4
votes
1answer
79 views
linux + change/edit file without effecting on file date [closed]
I want to edit some file in my linux for example
ls -ltr /etc/some_file
-rw-r--r-- 1 root root 188 Jul 1 2010 sysstat
.
echo "Server101_IP=187.0.98.4" >> /etc/some_file
.
I ...
0
votes
1answer
257 views
linux\solaris + print specific date format from file
subject - print file date on solaris as format: yymmdd ( yy - year , mm - month , dd - day )
on Linux machine I type the following command in order to get: file date
as the following:
ls -l ...
0
votes
0answers
81 views
Tomcat : include date and time in catalina.out
We are using third party application that runs on Tomcat.
The problem is that catalina.out produces times and no dates.I would think this is something simple to configure but my attempts to find ...
1
vote
2answers
82 views
How to use date functions for linux batch specile?
First, I wasn't sure if belonged to StackOverflow or here, but figure this would be more applicable to server administration.
We have a .tar backup file going to an offsite backup server each day as ...
2
votes
1answer
60 views
Users changing date/time from BIOS
We have around 350 Windows XP PC and a Windows 2008 R2 Server. The problem is that some users are changing the date/time from BIOS and the next user who would try to log-in on that PC would get the ...
-2
votes
1answer
49 views
Rounding by 5 minute interval [closed]
How do I round it to the next 5th interval?
# date
Sat Oct 13 22:09:25 IST 2012
# date '+%H-%M'
22-09
the output should be
22-10
When the minute is 58 it should round to 00 and not 60 though.
0
votes
2answers
161 views
how to manage dates in shell
emphasized textI have a file containing 14000 dates . I wrote a script to find the last 5 days ,
26/03/2002:11:52:25
27/03/2002:11:52:25
29/03/2002:11:30:41
30/03/2002:11:30:41
26/03/2002:11:30:41
...
2
votes
4answers
2k views
How to create a yesterday date in a batch
copy \\server01\E$\LogFiles\IVR\bcR\??120428.* \\LBC\workgroup\cs\ftp\Team\bcR\
copy \\server02\E$\LogFiles\IVR\bcR\??120428.* \\LBC\workgroup\cs\ftp\Team\bcR\
copy ...
5
votes
3answers
185 views
Is an ntpdate correction atomic?
I've got the following in /var/log/syslog, from yesterday (July 30th)
Dec 16 22:54:05 omap ntpdate[432]: step time server 91.189.94.4 offset 12052648.821465 sec
ntpdate 91.189.94.4 "corrected" my ...
0
votes
2answers
43 views
Is there a way to set the date on a server from the date from another server?
Someone asked me to update the times on 4 servers that are not connected to the internet and they have no ntp server.
e.g
/etc/hosts
146.92.25.3 jollibee
146.92.25.4 mcdonalds
...
0
votes
5answers
169 views
Find all files recursively by a certain date
My site is compromised by an FTP brute attack and the cracker modified / created some files in my home directory.
Let's say the date of the malicious creation / modification is 2011-4-5 21:38:09. ...
0
votes
0answers
47 views
Server-Side-Include date formatting not working on Apache 2
I'm a webmaster trying to figure out what might need changing in the setup of our new web server to fix this SSI issue. Until I can replace much SSI code with PHP in many many pages, I need to make ...
5
votes
4answers
1k views
How to tell if a file is older than 30 minutes on AIX?
I'd like to write a shell script in ksh or bash which exits with 1 if a specific file is older than 30 minutes. (Last modification time is older than half hour).
It would be easy on a Linux or a ...
1
vote
3answers
816 views
Linux Centos 6.2 “hangs” until date is synchronized
I'm having a problem that i cannot understand why or how to solve it.
I have a Centos 6.2 server, that's my secondary DNS (bind 8) and DHCP (ISC's dhcp server).
I need to maintain an accurate date ...
2
votes
2answers
105 views
Display nth instance of grepped pattern
So here's my problem. I have an issue with a .csv file (Current.csv) in that there are commas randomly place throughout the data, so awk-ing the file doesn't give me constant column numbers for a ...
3
votes
2answers
1k views
Why is $ date still displaying EST when /etc/localtime is symlinked to /usr/share/zoneinfo/GMT?
I'm having a problem setting the date on my server...
$ ls -la /etc | grep localtime
lrwxrwxrwx 1 root root 23 Mar 6 12:07 /etc/localtime -> /usr/share/zoneinfo/GMT
For some reason, although ...
-2
votes
2answers
122 views
How do I change the year in Unix?
I've looked at the man page for "date" and I can't figure out how to change the year. I know there is some string you need to create to describe the date format but how do I use that?
1
vote
1answer
152 views
Apache RewriteCond: inject string into URI between regex match groups
EDIT
This works, needed to use % in place of $ for capture groups:
RewriteRule (.*) http://localhost:8081/%1/%{TIME_YEAR}1101%2 [P]
Having a hard time sorting this out.
Need a date string ...
0
votes
2answers
130 views
Time and date simulation for application
Is there any possible way how to simulate different system time for application/ service ?
I need to send for ex. date 20.4.2012 to one app, but need to have real date and time set in windows.
Thanks ...
0
votes
1answer
140 views
setting logrotate to use UTC time
Is it possible to force logrotate to use UTC time for one configuration? I need the dateext to be set to UTC. I was hoping it was as simple as setting a date varible. Should I just run postrotate and ...
2
votes
2answers
399 views
Bash scripting: detect first day of month
I wrote three bash files:
incremental_backup
full_backup
execution
Now I want another bash script do the following :
if (date is the start of month 1/-/----)
then
invoke `full_back_up`
...
5
votes
2answers
182 views
date +%s glitches
I have a strange issue I'm starting to troubleshoot and wondered if anyone would have any helpful tips.
I have a cronjob executed every minute that executes a script and appends the output to a file ...
0
votes
1answer
129 views
NTP on main server, and alternative on virtual (LXC)
I am setting up a server with several VPS. I am using LXC.
I am thinking it would be better to have only the main server equipped with ntp and have the virtual boxes just get the time from the main ...
0
votes
1answer
171 views
Sanitizing dates using sed or awk on an ldapsearch query
I'd like to pipe the output of an ldapsearch to sanitize the dates returned - I presume sed and/or awk can help with this but would appreciate a bit of help.
The fixed length date format in the LDIF ...
1
vote
1answer
918 views
How do you set a DATE variable to use in a log for crontab output?
I was playing aroudn with some variations of date like
DATE = $(date)
but that didnt work either
crontab -e
CRONLOG=/tmp/log/crontab.log
DATEVAR=`date +20\%y\%m\%d_\%H\%M\%S`
* * * * * echo ...
0
votes
2answers
873 views
How do I set current Unix time in milliseconds?
Possible Solution
date --set="2011-12-07 01:20:15.962" && date --rfc-3339=ns
Original Question
I can get the date with milliseconds like so:
date +"%S.%N"
date --rfc-3339=ns
According ...
1
vote
2answers
212 views
Convert SELinux log date format from Epoch to Normal
When SELinux logs an event to the audit log on my CentOS 6 system, it's logging it in epoch time which makes for a real hassle when trying to troubleshoot. Is there any way to make it log these events ...
0
votes
2answers
95 views
search and print specific date in a log file
I'm working with a log file and I want to print from a specific day till the end of it .
that specific date is ($sd=27/Dec/2002) for example. now I want to search for this day and print from it till ...
-1
votes
1answer
60 views
find a date in a log file
I want to find a date in a log file and print from that date till the end of log file
and that date is 5 days prior to the end of log file which is 27/Dec/2002
the log file is like this : ...
1
vote
3answers
164 views
convert epoch time to readable time foramt
I wrote a code which convert epoch time to readable time
sd=`date -d '1970-01-01 UTC '$SDATE' seconds' +"%d-%m-%Y"`
the output is : 27-12-2002 but I want the output to be : 27/Nov/2002
how should ...
4
votes
5answers
138 views
User creation on Linux Redhat
Is there anyway one can determine when a user was created on Linux? I know of a couple of things one can do,but it's an unreliable way of doing it. The first option is checking when the home directory ...
6
votes
1answer
646 views
Time too quick in debian, 72 minutes pass in system date in one real world second
Having trouble with system date/time in GNU/Linux/Debian:
Time goes too fast for date, time, cron.
The sleep command works fine, file modification times are correct.
The issue explained via commands:
...
1
vote
1answer
114 views
modification time of file in future, but timezone is set correctly
Files that I am creating at a Unix server are created with a modification time that lies 5 days in future. But when I check with the date command, it seems, that timezone and date are set correctly. :
...
0
votes
1answer
333 views
Date / time out of sync by days
I have several 2003 servers in my domain that randomly change their date/time by several days, sometimes. They are all getting their time from an AD server acting as the primary DC.
I have looked in ...
0
votes
1answer
162 views
Timezonesetting not honored, system keeps sitting on timezone
whatever I try, my system (Ubuntu) stays at BRT time instead of CET. I have tried:
sudo dpkg-reconfigure tzdata
and set the timezone to "Europe/Berlin".
date still shows BRT instead of CET or ...
1
vote
1answer
187 views
winscp filter by date
How to transfer files with WinSCP that are older than N days? It seems there is no such option inside. But could it be done with scripting/cmd mix?
0
votes
0answers
345 views
change Solaris date to 24-hr instead of 12-hr
I am trying to change the date format in solaris:
What I have now:
[root]gizmo08:/var/adm date
Wednesday, May 11, 2011 9:27:20 PM GMT
what I want:
[root]gizmo08:/var/adm date
Wednesday, May 11, ...
1
vote
4answers
511 views
cron job to remove files with specific name
I have this in my crontab
0 3 * * * mysqldump --host=10.100.100.3 --user=username --password=mypass --routines DBName | gzip > /tmp/mysqldumps/mydb.`date +"\%Y-\%m-\%d"`.gz
now I need to create ...
0
votes
3answers
322 views
cron clock problem
I have noticed on my RHEL 5.5 that cron daily starts an hour later (at 1AM instead of midnight). System and hardware clock are the same. How can i set it so it will start at midnight?
date
[root@a ...

