General :: Date - How To Set Current Time

Jun 26, 2011

Why is the output of the following commands different?

root@vmi2115:/var# hwclock
Sun 26 Jun 2011 01:21:38 PM CEST -0.273230 seconds
root@vmi2495:/var# date
Sun Jun 26 15:21:39 CEST 2011
root@vmi2115:/var#

And can I change the current time on Linux?

View 4 Replies


ADVERTISEMENT

Networking :: Put Current Date And Time On My Machine From Certain URL?

Dec 7, 2010

I am using the Terminal. I would like to know how do I put the current date and time on my machine and the date from a certain URL that has .php extension into a file.

View 3 Replies View Related

Ubuntu :: Show Current Date And Time In Screen Saver

Jan 20, 2011

[URL] While I could follow it: For what I am trying to do, it did not work. how to get it working?

View 8 Replies View Related

General :: How To Add 5 Years To Current Date

Mar 17, 2010

I am using Red hat Linux operating system.I want change the date exactly 5 years ago to current date with out providing month, date and time. I want only the year should be 5 years ago .please help in this regard . example . If current date is this = Wed mar 18 22:59:23 IST 2010. past date shuld be like this= Sat Mar 18 22:59:23 IST 2005

View 6 Replies View Related

General :: Change The Creation Time Of All A Folder's Files To The Current Time?

Jun 19, 2011

Under a Linux shell, how can I change the creation time of all a folder's files to the current time?

View 2 Replies View Related

General :: Rpm -qa --last Lists All Rpm With Date And Time?

Oct 4, 2010

rpm -qa --last lists all rpm with date and time. But I want to sort the list by date, with earlier rpm displayed first. So it needs pipe, rpm -qa --last |

View 2 Replies View Related

General :: Date And Time Of A Process When It Was Started?

Mar 19, 2010

Centos 5.4 64bitWould like to know when a particular process was started.1.Quote:ll -d /proc/4014/dr-xr-xr-x 5 mysql mysql 0 Nov 28 07:34 /proc/4014/2.Quote:ps -o pid,lstart -p 4014 PIDSTARTED 4014 Tue Nov 17 23:10:13 20091) Which one should I consider?2) why do both have such a difference?

View 1 Replies View Related

General :: Extracting Date And Time From The At Command?

Sep 10, 2009

I would appreciate help with how to extract the date and time from at command jobs. From what I can tell, the date and time is embedded in the file name (/var/spool/atjobs).I'd be using this information in a (bash) shell script.

View 14 Replies View Related

General :: Set Date Time Using A File Content?

Jan 13, 2010

I have a file called foo with a date string in it - and nothing else in the file

2010.01.13-22:28:28

I want to send this file content to date -s command so I can modify using a cron job.

I tried several ways to pipe the file contents to date command but did not work.

View 4 Replies View Related

General :: Time And Date Deleted / Reinstall It?

Mar 16, 2011

I am using Ubuntu 10.4 and by mistake I deleted time and date. How do I reinstall?

View 2 Replies View Related

General :: Uptime - Getting Date & Time Of System Startup?

Mar 28, 2011

I know that uptime prints the time a machine has been up and running, but is there an easier (reliable) way to get the date of the start up than counting down from this output?I tried looking around /proc, but didn't find anything of relevance. There's also a line like this on my dmesg: [ 0.673492] rtc_cmos rtc_cmos: setting system clock to 2011-03-14 14:26:52 UTC (1300112812), but I'm wondering if this method is distribution and kernel version agnostic.

View 5 Replies View Related

General :: How To Set Debian To Automatically Update Time And Date

Aug 14, 2011

I have an old computer and BIOS counts the time slower than real. So, how can I set my OS to update the time automatically using the internet? If it updated the time only during booting, it would be enough.

View 2 Replies View Related

Fedora :: Network Time Protocol Part Of Date / Time Settings

Oct 3, 2009

I've got fedora 11 set up to use network time protocol to sync my laptop's date & time when I'm on-line. The question is simple really, I've added a local universality's time server (what is public) and it's live. but it's added to the end of the default time servers what come with fedora. How do I get fedora to just use the local time server, is it a case of removing the default time servers for fedora, but there is a box what says advanced options which are. sync system clock before starting service ???? & use Local time source (( is that the same as the local ntp server that I've got set up ))Hope some body can help me with the network time protocol part of Date/Time settings.

View 9 Replies View Related

General :: Task Manager - Setting Time / Date Do Not Work?

Feb 19, 2010

I tried googling but couldnt find the task manager equivalent? Just want to find out how much memory LINUX uses in general as I have been using it for few days and everything seems faster than on vista with no programs freezing! Also on my taskbar, when I click on the time to change it, it doesn't work? I think the timezone is set to US or something but how do i change the timezone?

View 2 Replies View Related

General :: Script To Display Modified Date&time Of Files?

May 31, 2010

I am using the following script to creates list of accessed files.I like to add modified date and time of accessed files in the output.

For this what needs to be added in the below script??

#!/bin/bash
#
# creates list of accessed files
#
set $(date)
find /hdc160GB/programmers/projects -cmin -1440 > /hdc160GB/programmers/data/fileschanged/alert_$6-$2-$3.txt

View 7 Replies View Related

General :: Log The Start/completion - Time&date - Of My Cron Job Script?

Jan 11, 2010

How do i log the start/completion (time&date) of my cron job script? i want to be able to see what time it started and what time it finished? and if there where any errors while running my script.

View 3 Replies View Related

General :: Date And Time Disappeared From Upper Right Hand Corner

Jun 26, 2010

I used to have the date and time in the upper right hand corner and then yesterday morning it was just gone. I can't figure out how to get it back up there. I've looked everywhere I thought it would be to put it back on there and I've had no such luck.

View 2 Replies View Related

Ubuntu :: Set Time To Singapore Server With Time And Date?

Oct 28, 2010

I want to synchronize my time to a time server in Singapore. How can i do so with the Time and Date in System - Administration - Time and Date?

View 4 Replies View Related

Red Hat / Fedora :: Date And Time Changing All Time / Solution For It?

Jan 11, 2010

I have a problem..
the Date and time are changing all the time...

Meanwhile, I'm set the clock every day, But I must find a solution ... Do you have a solution?

View 1 Replies View Related

General :: Find A Proper Command To Move A Certain Set Of Files According To Date/time Range?

Mar 18, 2009

I'm trying to find a proper command to move a certain set of files according to date/time range. I am thinking that the command should be something like:

Code:
ls -l | grep 'date/time range' | mv /folder

View 6 Replies View Related

General :: Awk: Awking The Right Separator With Slashes - Colons - Commas (date Time And Data)

Jan 4, 2011

I wrote a hack script that outputs the following every so often: Code: 01/04/11 10:33:02: 97,1413,1447,2860 I must leave the data format the same --but I want a special number from it. In this case it's 97 and it's always going to be the first in the 4 columns of comma delimited items. I can extract with this:

Code: cat datafile | awk -F" " {'print $3'} | awk -F"," {'print $1'} But that's really sloppy. Can someone point out a better way of doing this (with awk) and tell me why?

View 3 Replies View Related

General :: Retrieve The Current Time On A Server?

Feb 18, 2011

I want to know the time on a server accurate to the millisecond.there's this way:

local $ ssh user@servername
Welcome to server!
server $ date
Fri Feb 18 11:27:50 EST 2011

But I need more accuracy. Is there a command that will be more precise?

View 2 Replies View Related

Fedora :: Strip Current Date With SED?

Nov 9, 2009

I have some text based reports in which I would like to strip the "Current Date" from and replace with equivalent number of empty spaces, for every occurrence.For example, here is what I need to strip:

Date: 11/09/09

If I manually run the following SED command, it works great, however I cannot seem to find a way to use the actual "date" command within SED, to get the desired results.

WORKING: sed -i -e 's/Date: 11/09/09/ /' myfile

I've been messing around with various attempts to do this using the "date" command within SED, but I just can seem to get it right. I've also attempted defining variables which call separate "date" commands for day, month, year and inject them via standard variable calling, echoing variable, expanding variable with brackets, etc... Here are a few of the SED command attempts I've tried:

Quote:

sed -i -e 'sate: `date +%D`: :' myfile
sed -i -e "s/Date: `date +%d`/`date +%m`/`date +%y`/ /" myfile
sed -i -e 's/Date: `date +%d`/`date +%m`/`date +%y`/ /' myfile
sed -i -e 's/Date: $(date +%D) / /' myfile

I need to replace it with the equivalent number of spaces, as I'm going to be overlaying a PCL Logo here and need to keep the structure of the rest of the file. Cannot have the remaining portion of the line shifting left.

View 5 Replies View Related

Software :: How To Get Current Date Log Files

Mar 13, 2011

Currently I'm using `ls -l | grep "Mar 13" ` for listing today log files.Output :-rw------- 1 root root 2188192 Mar 13 10:33 audit.logBut my requirement like below,note permission,date,size...audit.log Note : Where 10 logs file are same directory in different date , But I'm looking files which are logging in today date (Mar 13)

View 2 Replies View Related

General :: Tricking Apps About Current Time With Environment Variables?

May 21, 2010

Sometimes it is possible to trick a Linux app by calling it like this:

HOME=/tmp/foo myapp

This would make myapp think /tmp/foo is the home directory, it won't try to get the user id, find its home directory via getpwent(). This is useful when myapp must be forced to dump some of its config files into a non-standard location different than ~.

A similar trick can be done like this: LANG=foo LC_ALL=bar myapp

This is useful when myapp needs to be called once with a different locale without having to make the change persistent by using the export bash built-in or even modify stuff in /etc/profile.

Is it possible to pull the same trick with time and date? The goal is to make an app use another time than the system ones. The final goal - to make timestamps that appear in logs/commit messages not being tied to the system time.

View 1 Replies View Related

General :: Current Time - File Path No Longer Valid

Aug 21, 2011

I am reading about jiffies in linux kernel. In one of the related example in the book Linux Device Driver, the author use
head -8 /proc/currentime
to print out some time information.

However this file is not present in my linux installation (kernel: 2.6.32-131.6.1.el6.x86_64). Why is it the case? Is it because the file path is no longer valid, or it is a distribution feature thing? It is not present in OSX too. What would be an equivalent in OSX?

View 1 Replies View Related

General :: Search A String In Logs Of Last 15 Minutes From Current Time?

Aug 26, 2010

I want to run a script that runs after every 15 minutes that i will do using crontab. But in script want to search a string from the last 15 minutes logs in log file containing data of whole day.

how i can search the string according to time difference that is logs from from current time and current time - 15 minutes.

Sample logs are as follows:

26-Aug-2010 16:38:46,055|9172310750|subscription_app|31ba267e%3A12aadd47bdc%3A50e9|ChargeAmount|ChargingIntercep tor - subscriber details processed sucessfully- {arg0.referenceCode=balanceEnquiry:true;subsChannel:Unknown;channelType:Subscription;transactionId:3

[Code]....

View 6 Replies View Related

Programming :: Get The Current Time As Provided From NTP (not The Currently Set Time On The Server)?

Jun 9, 2010

Is there a way to get the current time as provided from NTP (not the currently set time on the server)?

View 4 Replies View Related

SUSE :: Determine The Report File Name Based On The Source Directory Name And Current Date?

Apr 17, 2010

### TO DO: Determine the report file name based on the source directory name and current date### The report name and thumbnail directory must follow this pattern: source-%j-%H### for example, for pictures in /home/you/pictures, the file name will be: pictures-%j-%H### HINT: Use sed to extract the directory name from the path and combine it with date command output

View 1 Replies View Related

General :: Change A Files Modification Date "only" Without Changing The Time?

Oct 29, 2010

I'd like to change a files modification date "only" without changing the time. I'm aware of the 'touch' command but is seems like it only allows changing both the date and time, and not one of them. Any ideas on an easy way to change a file's modification date without also changing its time? (I have a long list of files and thus would like to run one to command to change them all)Example: Change a file's (month) timestamp from "2010-09-23 11:59:23" to "2010-10-23 11:59:23"Background: I accidentally set the wrong month on my camera and ended up with all photos having a modification timestamp with the wrong month.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved