Sponsored Content
Top Forums Shell Programming and Scripting Show date/time with tail|grep command Post 302296020 by jim mcnamara on Tuesday 10th of March 2009 07:16:34 AM
Old 03-10-2009
Ok- then you tell us how to know when the line in the logfile was written. If the file was written out over a period of time the file mtime is LAST time it was written to - the time for the last line in the file - not the time a given line was written.

Without timestamps or some other file with timestamps you cannot get anything but a file mtime - or a ctime which in this case is pretty much useless.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep time and date

Hi, I have a file which is a result of a script running every two minutes. What I wanted to do is to grep a specific date and time (hour and minute) from the file and then count the occurance of 201. I need to get the result of occurance of 201 every 5 minutes. What should I include in my... (8 Replies)
Discussion started by: ayhanne
8 Replies

2. Solaris

Can history commands show what time command executed

On Solaris 8 and 10 is there a way history command can show what time a particular command was executed. Pls reply. Thanks (2 Replies)
Discussion started by: Tirmazi
2 Replies

3. Shell Programming and Scripting

grep to show date/time of file the string was found in.

I've seen several examples of grep showing the filename the string was found in, but what I really need is grep to show the file details in long format (like ls -l would). scenario is: grep mobile_number todays_files This will show me the string I'm after & which files they turn up in, but... (2 Replies)
Discussion started by: woodstock
2 Replies

4. Shell Programming and Scripting

tail command not show on screen

Hi, I'm moniroting duplicate text with unix command (tail -f trace75747 | grep 'duplicate'), but it showed many lines then it stop show trace information although trace information in this file trace75747 always got. What should I do? I look forward to hearing from you. THANKS! (10 Replies)
Discussion started by: seyha_moth
10 Replies

5. Shell Programming and Scripting

grep - date & time range

Hi, I need to search email files by date & time range in email files. The timezone is not important. Can someone plz advise how i can do this ? For e.g A user can specify only A single date A date range date & time range Below is part of the email file. (4 Replies)
Discussion started by: coolatt
4 Replies

6. Shell Programming and Scripting

Grep command to show only process name

Can I modify the grep command to show only a process name? Currently I run ps -efa | grep chk_web to get the following: mousr 3395 1 0 09:36:06 pts/10 0:00 sh /var/opt/scripts/chk_web.sh Can this be changed in any way to get only: /var/opt/scripts/chk_web.sh or chk_web.sh. I... (3 Replies)
Discussion started by: runnerpaul
3 Replies

7. Shell Programming and Scripting

How to use command tail -f & show line number.

Hello Guys, I have created function which is as follow: tail -f filename |grep "Key word" output from this command 19-11-2011 21:09:15,234 - INFO Numbement - error number:result = :11 19-11-2011 21:09:15,286 - INFO Numbement - error number:result = :11 19-11-2011 21:09:15,523 - INFO... (5 Replies)
Discussion started by: ooilinlove
5 Replies

8. UNIX Desktop Questions & Answers

grep a range of time & date

how can i grep a range? i have a text file with the following text: result.log.00:2012/01/02 12:00:07.422 LOG STARTED HERE N6Kashya29MemoryShieldScheduler_AO_IMPLE, pid=8662/8658, config=(alertThreshold=10,alertLevel=0,killThreshold=7200,coreThreshold=0,full=1), deltaTime=0,... (1 Reply)
Discussion started by: boaz733
1 Replies

9. Shell Programming and Scripting

How do i use tail & grep in real time here??

Hi I have a file which is updated very frequently. Where in i wanted to use tail -f command in the script and wanted to grep for a particular word. But the issue is when i use tail -f filename|grep "word" ... it will show me blank until the word is found in the real time. if it shows... (13 Replies)
Discussion started by: nikhil jain
13 Replies

10. UNIX for Beginners Questions & Answers

Grep command to show the number of results

Hi I wanted to know if there is an option in grep command to show the number of results (not the number of lines of findings). Thanks (14 Replies)
Discussion started by: abdossamad2003
14 Replies
GPSCORRELATE(1) 						  [FIXME: manual]						   GPSCORRELATE(1)

NAME
gpscorrelate - correlates digital images with GPS data filling EXIF fields SYNOPSIS
gpscorrelate [-z | --timeadd +/-HH[:MM]] [-O | --photooffset seconds] [-i | --no-interpolation] [-v | --verbose] [-d | --datum datum] [-n | --no-write] [-m | --max-dist time] [-t | --ignore-tracksegs] [-M | --no-mtime] [-f | --fix-timestamps] [-p | --degmins] -g file.gpx image.jpg... gpscorrelate -s | --show | -o | --machine image.jpg... gpscorrelate [-M | --no-mtime] {-r | --remove} image.jpg... gpscorrelate -V | --version | -h | --help gpscorrelate-gui DESCRIPTION
This manual page documents briefly the gpscorrelate and gpscorrelate-gui commands. There is an extended documenation available in HTML format; see below. gpscorrelate is a program that acts on digital images in JPEG format filling EXIF (Exchangeable Image File Format) fields related to GPS (Global Positioning System) information. Source for the GPS data is a record of GPS information encoded in GPX (GPS Exchange Format) Format. The act of filling those fields is referred to as correlation. If GPS data are available at the precise moment the image was taken (with a 1-second granularity) the GPS data are stored unmodified in EXIF fields. If they are not linear interpolation of GPS data available at moments before and after the image was taken can be used. gpscorrelate is a command line tool implementing correlation whereas gpscorrelate-gui is the corresponding GTK+ graphical user interface. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the HTML documentation. -g, --gps file.gpx correlate using the specified GPX file with GPS data -s, --show only show the GPS data of the given images -o, --machine only show the GPS data of the given images in a machine readable output, if there is any -r, --remove only remove GPS EXIF data from the given images -z, --timeadd +/-XX[:XX] time to add to GPS data to make it match the timestamps of the images. GPS data is in UTC; images are not likely to be in UTC. Enter the timezone used when taking the images: eg, +8 for Perth -O, --photooffset seconds time in seconds to add to the photo timestamp to make it match the GPS timestamp. To determine the amount of seconds needed, just create a picture of your GPS device showing the current time and compare it with the timestamp of your photo file. -i, --no-interpolation disable interpolation between points. Interpolation is linear, points are rounded if disabled -v, --verbose show which GPS data has been selected for each image -d, --datum datum specify measurement datum. If not set, WGS-84 used -n, --no-write do not write the exif data. Useful with --verbose -m, --max-dist time max time outside points that image will be matched. Time is in seconds -t, --ignore-tracksegs Interpolate between track segments, too -M, --no-mtime Do not change mtime of modified files -f, --fix-timestamps Fix broken GPS datestamps written with versions < 1.5.2 -p, --degmins Write location as DD MM.MM as was default before < 1.5.3 -h, --help Only show summary of options -V, --version Only print the version SEE ALSO
gpsd (1), gpsbabel (1), gpxlogger (1), cgpxlogger (1). The documentation of gpscorrelate and gpscorrelate-gui in HTML format are available on the filesystem at /usr/share/doc/gpscorrelate. AUTHOR
This manual page was initially written by Stefano Zacchiroli zack@debian.org for the Debian(TM) system. It was extended by Till Maas opensource@till.name. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. AUTHOR
Stefano Zacchiroli Author. COPYRIGHT
Copyright (C) 2006, 2008 Stefano Zacchiroli zack@debian.org, Till Maas [FIXME: source] 30 Oct 2008 GPSCORRELATE(1)
All times are GMT -4. The time now is 08:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy