The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
2answers
191 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 ...
6
votes
1answer
922 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
231 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
538 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
282 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
4answers
1k 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
5answers
282 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. ...
1
vote
4answers
633 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 ...
3
votes
3answers
338 views

date -d: what are the accepted strings?

I am using the "date" command to perform some simple date arithmetic. The "-d" option lets me do this, but the man pages are very unclear on what is valid data. What are all the accepted options, and ...
1
vote
3answers
872 views

Deleting all folders older than a specified date, except some of them

i had to do a script job in bash to delete all directory in a path which are older than a specified date except some of them. i know the name of the directories which shouldn't be deleted... Can you ...
0
votes
2answers
269 views

System reboot on executing “date -s” command

My system reboots when i give the "date -s" command. I collected the log and it says this Jan 18 13:27:46 watchdog[2421]: file /tmp/cmm/strobeWDT was not changed in 1 seconds. Jan 18 13:27:46 ...
0
votes
1answer
443 views

Defining date attributes in openldap

There doesn't appear to be a standard date syntax. How do people handle entering dates into ldap so that they are comparable and invalid data can't be entered? I'm hoping to enforce a fairly ...
0
votes
2answers
75 views

System Date and httpd/mysqld

Hi when i change the date: date -s "01 Jan 2011 01:30:15" Do services such as mysqld and httpd need to be restarted for thier date to update? or is there a better way to handle these services date ...
5
votes
2answers
6k views

Calculate Days Since 1/1/1970

How can you calculate the number of days since 1/1/1970? This is for updating the shadowLastChange attribute on OpenLDAP. Is there a way to do this using the linux date command?
3
votes
2answers
528 views

Question on date and timezone in Linux

I did the date command and it gave the following output root@localhost:~$ date Thu Dec 30 14:19:47 UTC 2010 Then i modified the date using date -s command whichn gave the following output ...
0
votes
2answers
322 views

Named pipe with shell command date

I want to let a standard user change the system date. So I created a named pipe. The standard user write a date to the named pipe and a root process listens to it and sets the date accordingly: ...
1
vote
1answer
159 views

Log “date -s” command

I know that the date -s <STRING> command sets the time described by the string STRING. What i want is to log the above command whenever it is used to set the time into the file ...
5
votes
5answers
7k views

Cannot access client pc remotely due to time/date issue xp win2k3 environment — REMOTE solution please

When I run psexec to the user desktop (xp pro) I get "There is a time and/or date difference between the client and the server." I also get "access denied" when I run the at \clientname time ...
0
votes
1answer
901 views

Forbid users to change DateTime settings at their desktop WinXP

What is the easiest way to block changing the Time and Date settings on desktop workstations running Windows XP?
0
votes
2answers
370 views

date keeps resetting

I have a virtual machine(VirtualBox) running Ubuntu server. When i issue date -s 2011-01-01 it changes the date, but after a few seconds, the date resets itself to the real time. I do not have any ...
2
votes
2answers
1k 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` ...
4
votes
3answers
2k views

Why is my “Last log on” date wrong?

I'm sitting here across the office from Bob, who is logged into the domain right now, working away. I pull up AD Admin Center and take a look at Bob's account and it tells me his last log on date is ...
1
vote
1answer
241 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
3answers
94 views

Server Time Jumped Ahead 7 Months

CentOS 5.x My CentOS server appears to have jumped ahead 7 months. I'm not sure how or why. Are there any logs in CentOS that could provide more insight here? Unfortunately, ntpd was not running. ...
0
votes
5answers
848 views

last modified date of directory

Is there any way to get the last modified date of a directory, including sub directories? either via shell script or php? Thanks!
2
votes
3answers
199 views

Changing linux date with current time

I am running sudo date +%m/%d/%Y -s 7/14/2010 command to change date. It changes fine except I want it to pick up the current time as well, and not start the time from 00:00:00 on 7/14/2010.
0
votes
1answer
62 views

Incorrect file creation/modication time in linux

In our server we get files uploaded daily by customers via FTP. However sometime the the time stamp of these appear incorrect even though the server time is correct. I got a file with time stamp Jun ...
5
votes
1answer
790 views

Is it possible to set the date on a Linux machine to the year 2040?

I need to be able to set the date on Ubuntu (8.04.4 LTS) to the year 2040 (to test something that isn't relevant to this question). Is that possible? I can run: $ sudo date -s "15 JAN 2038 ...
1
vote
4answers
152 views

One Linux server has two timer

The time on one of our Linux box is very weird. Whenever I call date 3 times, the 4th call will give a wrong time(usually 1 hour later). I have setup cron to sync with ntp server. We have 20+ similar ...
1
vote
2answers
932 views

Unable to set the date on a CentOS VM

The time on a Xen VM running CentOS 5 is incorrect. Running the date command seems to result in the expected output, but subsequent calls to date still show the incorrect time. [xxx@xxx ~]$ sudo date ...
0
votes
14answers
35k 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 ...
2
votes
1answer
1k views

Set up a permanent system date

I need to set up a permanent system date in a Linux test server for time-sensitive software which needs this time loop (Groundhog day's style) or bending time (Hiro's ones), you name it. I tried it ...
4
votes
5answers
6k 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 ...