The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
25 views

Ubuntu server time jumping away

I wanted to write "drifting away" in the header but this is not what's happening. I have an Ubuntu 12.04 LTS server running some web apps. On 25.10.2014 I updated tzdata to the latest version and ...
-2
votes
3answers
87 views

crontab job is setting date wrongly [duplicate]

I need to set date and time in my server in order to make them synced always. I cannot use ntp inside my channel due to proxy issues. I've found this workaround. It works fine when I run it in command ...
0
votes
0answers
80 views

Graylog2 date extractor from tab-delimited file

I have a tab-delimited logs with such messages: 2014-06-01 00:00:56 192.168.1.1 968 http://yandex.ru I can extract date and time with regexp (\d{4}-\d{2}-\d{2}\s*\d{2}:\d{2}:\d{2}) but when I ...
0
votes
1answer
54 views

Binding timestamp value to a variable in crontab

I'm basically trying to declare a variable with a date() value in crontab as I will constantly be using the same date structure over and over, here is what my crontab looks like so far. php = ...
16
votes
3answers
2k views

Why is there a difference with Unix date between 2 and 3 months

How is this possible and how do I deal with it? I'm making backup script that is dependent on Unix date and have discovered an interesting bug: [root@web000c zfs_test]# date +%y-%m-%d --date='2 ...
0
votes
1answer
40 views

bash date not using the set timezone

I have export TZ="/usr/share/zoneinfo/Europe/London" in my .bashrc file, but the following output the time in UTC (GMT) export TM=`date +%H%M%S` export DTTM="`date +%a\ %F\ %T\ %Z`"
-2
votes
1answer
146 views

Set Debian Wheezy date to UTC [closed]

I'm not an expert in Linux servers, and I'd like to configure my server to use the UTC timezone, so there's no issue between the applications running on it. I don't really know how to do this. I ntp ...
-2
votes
1answer
33 views

Ubuntu shell: Get tomorrow's weekday [closed]

I have a shell script for backups and I need the Weekday of tomorrow. $Today = $(date +%a) #$Tomorrow = ?
0
votes
1answer
55 views

DBVis SQL Query - Using Date Variables

Firstly it's been a very long time since I did any SQL and even then it wasn't at a high level. I have created a SQL query which works but I want it so the date range changes automatically, for ...
0
votes
1answer
153 views

How to set up date/time on DGS-1500?

I have numerous D-Link DGS-1500-28 switches with firmware 1.00.013, 1.10.005 and 2.10.002 on it, and there are no visible option to set up date/time via web- or telnet-interface. Device uses ...
1
vote
1answer
34 views

How to generate a signature with a launchd plist? [closed]

Is it possible to implement the following shell script completely as a launchd plist to generate a signature with timestamp in the StandardErrorPath / StandardErrorPath files? #!/bin/sh echo "Hi, ...
1
vote
2answers
386 views

Server timezone changed to PHT but logs still written in MST?

A couple of days ago, I updated the timezone on an Ubuntu 12.04 LTS server using $ sudo dpkg-reconfigure tzdata. Today I noticed while tailing the mail log, that the times were still 15 hours behind. ...
0
votes
1answer
122 views

Mysql general query log tool to play back queries in time?

I am trying to reproduce production activity in time for benchmarking purposes from the mysql general query log. I'd like to be able to use the date data from the log to reprduce the time intervals ...
0
votes
1answer
509 views

Ubuntu 12, cannot change date and time

whenever I try to set the date from either the command line, or using the Settings window, the new value is always reverted after a few seconds. I have tried many things: e.g. date ...
1
vote
0answers
129 views

Update clock on virtualbox virtual machine with cent os from host

I have a virtual machine, with cent os installed, and everytime I sleep the host computer, the clock of the VM goes out of sync. I would like it to pick up the current time from virtualbox - which I ...
4
votes
2answers
7k 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
3k 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
167 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 ...
1
vote
2answers
481 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
1answer
336 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
670 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 ...
-4
votes
1answer
134 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
2answers
1k 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
1answer
188 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 ...
1
vote
2answers
118 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
88 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
58 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.
5
votes
3answers
224 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
62 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 ...
2
votes
2answers
132 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 ...
-2
votes
2answers
302 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?
2
votes
4answers
9k 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
4answers
2k 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, ...
1
vote
1answer
302 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 ...
1
vote
3answers
2k 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 ...
5
votes
4answers
2k 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 ...
0
votes
2answers
245 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 ...
3
votes
2answers
2k 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 ...
0
votes
1answer
203 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 ...
5
votes
2answers
196 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
287 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
4k 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
2k 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
521 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
153 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
vote
3answers
202 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 ...
-1
votes
1answer
76 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 : ...
0
votes
2answers
186 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 ...
4
votes
5answers
514 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
888 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: ...