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


ADVERTISEMENT

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 :: Extracting Absolute Directory From Type Command?

Sep 26, 2010

I need to extract the absolute directory from the type command when I pass it a program name. E.g.

Code:

>type cat
cat is hashed (/bin/cat)

There is one other case (I believe):

Code:

>type lpr
lpr is /usr/bin/lpr

I thought of using regex, but it returns the whole line, not just the match. In addition, there is no option cited in the man page for type that returns just the command directory.

Note: this is part of my solution to a programming assignment in bash shell scripting.

View 1 Replies View Related

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 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 :: 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 :: 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 :: How To Use The Date Command

Jun 15, 2010

How to use the date command to display, for example, 10-Mar-2010 01:01:53? What's the format string?

View 2 Replies View Related

Ubuntu / Apple :: Extracting Specific File From Mac Time Machine Drive?

Mar 5, 2011

I am trying to extract just a few files/folders from a Time Machine backup, but can't seem to find them. The drive is automatically mounted in Ubuntu, and am able to access after enabling view hidden files, the HFS+ Private Data Directory. But that is a jumbled array of thousands of numbered folders, with each taking a fair amount of time to open on this aging Dell running 10.10.

I've tried running the standard Places - Search for Documents, with 'Show hidden and backup files' enabled, but that won't pull up any of the search times I'm going for (and seemingly won't find anything at all on the drive). So, is there any way to decipher the directory tree so as to be able to access this data from Ubuntu? Or perhaps a file embedded somewhere in there that lists out the original structure, so that I can use it as an index to see what number correlates to what originally named folder?

View 2 Replies View Related

General :: Pipe The Output Of Date Command?

Jul 21, 2011

I need to pipe the output of date command, to form a command like this:

mycommand -f 20110721

where 20110721 is current YearMonthDay.

View 1 Replies View Related

General :: Pass Multiline Output Of A Command Into 'date -j'

Mar 3, 2011

I am doing some NSCA log parsing and I want to get an output like this:

2011-Feb-18:11:00:07
2011-Feb-18:11:00:07
2011-Feb-18:11:00:07
2011-Feb-18:11:00:08
2011-Feb-18:11:00:08

[Code]....

I have tried this, but it treats the entire output as a single line, then plops a timestamp on the end (I think):

Code:

sort -b -k4.9,4.12 -k4.5b,4.7Mb -k4.2,4.3 -k4.14,4 foo.log| date -j -f "%Y-%b-%d:%T" "+%s" "`awk -F '[ [/:]' '{print $7"-"$6"-"$5":"$8":"$9":"$10}'`"

View 1 Replies View Related

General :: Pass Multiline Output Of A Command Into 'date?

Mar 3, 2011

I am doing some NSCA log parsing and I want to get an output like this:

2011-Feb-18:11:00:07
2011-Feb-18:11:00:07
2011-Feb-18:11:00:07

[code]...

View 6 Replies View Related

General :: Showing Date On Command Prompt Line?

Mar 1, 2011

i need to add the date of the root of the command prompt line, i can get it show to the date for any user how do i just do it for root? and i added it to the .bash_profile file

export PS1='[`date +%D` u@h W]$ '

View 3 Replies View Related

General :: History With Date And Executed File/command?

Feb 17, 2011

what is the tool to get the history inclduing the user name,command time and from which file/folder the command is executed.

View 1 Replies View Related

General :: Store The Output Of Date And Watch Command To A File

Jun 15, 2011

I am trying to watch a command and try to log it into a file. I tried

watch -t -n 10 "(date '+TIME:%H:%M:%S'
; ps aux | grep "pattern" | wc -l)" >>
logfile

and am expecting a result like

TIME: 10:32:30 12
TIME: 10:32:40 18
TIME: 10:32:50 2

to be stored in logfile. However, when the logfile has unprintable characters in in. How do I get this kind of output from the command li

View 4 Replies View Related

General :: Move To Previous System Date Using Command Line?

Sep 21, 2010

I want to know the command, so that i can move back two days i.e. all the changes i made during the two day is rolled back .

View 5 Replies View Related

Ubuntu :: Extracting .rar Packages - Insert A Password In Command?

Oct 17, 2010

Is there a easy program that uses a GUI or am I going to need to do this from the terminal, either way I don't care I just need to be pointed in the right direction. I installed the 7zip package and started using it in the terminal but I can't figure out how to insert a password into my command. 7z x <package> [LOCATION] ?

View 9 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

General :: Parsing File Dates - Get The Date Of The Last Time A File Was Modified ?

Jan 11, 2010

I need to get the modified date on a file in linux to use in a script.I tried using 'ls -l' on the file, but this caused problems when the date turned from a single digit into a double. The reason for the problem was because I was parsing the result string on spaces.How can I get the date of the last time a file was modified so I can use it in a script? For example, if a file was modified on 1/11/2010, I need the 11.

View 2 Replies View Related







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