Sponsored Content
Top Forums Shell Programming and Scripting How to tail -f logfile. if log file is generate every 1 HR.? Post 302830759 by ooilinlove on Tuesday 9th of July 2013 12:29:13 PM
Old 07-09-2013
Hammer & Screwdriver How to tail -f logfile. if log file is generate every 1 HR.?

Hello,

How to tail -f logfile. if log file is gennerate every 1 HR.
I want it works automatically all the time. never changes it by manual.
Thank

Code:
ls -trl CybertonTransaction.*
-rw-r--r--   1 autobot   robot    617071 Jul  9 00:02 CybertonTransaction.20130709-00.log
-rw-r--r--   1 autobot   robot   20728938 Jul  9 01:59 CybertonTransaction.20130709-01.log
-rw-r--r--   1 autobot   robot   3808189 Jul  9 02:59 CybertonTransaction.20130709-02.log
-rw-r--r--   1 autobot   robot   4389986 Jul  9 03:59 CybertonTransaction.20130709-03.log
-rw-r--r--   1 autobot   robot   3801622 Jul  9 04:59 CybertonTransaction.20130709-04.log
-rw-r--r--   1 autobot   robot   25008198 Jul  9 05:59 CybertonTransaction.20130709-05.log
-rw-r--r--   1 autobot   robot   59425803 Jul  9 06:59 CybertonTransaction.20130709-06.log
-rw-r--r--   1 autobot   robot   100000019 Jul  9 07:48 CybertonTransaction.20130709-07.log.1
-rw-r--r--   1 autobot   robot   8122571 Jul  9 07:59 CybertonTransaction.20130709-07.log
-rw-r--r--   1 autobot   robot   30973114 Jul  9 08:59 CybertonTransaction.20130709-08.log
-rw-r--r--   1 autobot   robot   100000022 Jul  9 09:46 CybertonTransaction.20130709-09.log.1
-rw-r--r--   1 autobot   robot   17700625 Jul  9 09:59 CybertonTransaction.20130709-09.log
-rw-r--r--   1 autobot   robot   100000088 Jul  9 10:44 CybertonTransaction.20130709-10.log.1
-rw-r--r--   1 autobot   robot   25620434 Jul  9 10:59 CybertonTransaction.20130709-10.log
-rw-r--r--   1 autobot   robot   100000128 Jul  9 11:43 CybertonTransaction.20130709-11.log.1
-rw-r--r--   1 autobot   robot   41932541 Jul  9 11:59 CybertonTransaction.20130709-11.log
-rw-r--r--   1 autobot   robot   100000094 Jul  9 12:41 CybertonTransaction.20130709-12.log.1
-rw-r--r--   1 autobot   robot   42354186 Jul  9 12:59 CybertonTransaction.20130709-12.log
-rw-r--r--   1 autobot   robot   100000052 Jul  9 13:33 CybertonTransaction.20130709-13.log.1
-rw-r--r--   1 autobot   robot   27483687 Jul  9 13:59 CybertonTransaction.20130709-13.log
-rw-r--r--   1 autobot   robot   100000124 Jul  9 14:56 CybertonTransaction.20130709-14.log.1
-rw-r--r--   1 autobot   robot   7474128 Jul  9 14:59 CybertonTransaction.20130709-14.log
-rw-r--r--   1 autobot   robot   100000118 Jul  9 15:51 CybertonTransaction.20130709-15.log.1
-rw-r--r--   1 autobot   robot   14859881 Jul  9 15:59 CybertonTransaction.20130709-15.log
-rw-r--r--   1 autobot   robot   100000033 Jul  9 16:48 CybertonTransaction.20130709-16.log.1
-rw-r--r--   1 autobot   robot   27120181 Jul  9 16:59 CybertonTransaction.20130709-16.log
-rw-r--r--   1 autobot   robot   100000143 Jul  9 17:39 CybertonTransaction.20130709-17.log.1
-rw-r--r--   1 autobot   robot   44957555 Jul  9 17:59 CybertonTransaction.20130709-17.log
-rw-r--r--   1 autobot   robot   68461482 Jul  9 18:59 CybertonTransaction.20130709-18.log
-rw-r--r--   1 autobot   robot   68803772 Jul  9 19:59 CybertonTransaction.20130709-19.log
-rw-r--r--   1 autobot   robot   70048244 Jul  9 20:59 CybertonTransaction.20130709-20.log
-rw-r--r--   1 autobot   robot   48556923 Jul  9 21:59 CybertonTransaction.20130709-21.log
-rw-r--r--   1 autobot   robot   34699326 Jul  9 22:59 CybertonTransaction.20130709-22.log
-rw-r--r--   1 autobot   robot   64397410 Jul  9 23:59 CybertonTransaction.20130709-23.log

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

tail -f a log file redirected into a new window?

Is this possible? I am attempting to display a new xterm window and tail -f the log file within that new window. I am currently working on a solaris 8 machine if that has any different meaning than the other platforms. As you can see, I am a newbie to this forum and to UNIX. Any help would be... (2 Replies)
Discussion started by: douknownam
2 Replies

2. Shell Programming and Scripting

Bash tail monitor log file

Hi there, I have a problem here that involves bash script since I was noob in that field. Recently, I have to monitor data involve in logs so I just run command tail -f for the monitoring. The logs was generate every hour so I need to quickly change my logs every time the new hour hits according... (2 Replies)
Discussion started by: kriezo
2 Replies

3. Shell Programming and Scripting

Modify script to generate a log file

I've seen several examples of scripts in thise forum about having a script generate a log file. I have a script that is run from cron and that monitors a file system for a specfic filename(s) and then performs some actions on them. Normally I call this script from another script (which the one... (2 Replies)
Discussion started by: heprox
2 Replies

4. Shell Programming and Scripting

how to tail a log file..

Hi All.. I have a log file in which all the backup information is stored. Now i have written a script which get the last line in the backup log file.. ssh -l ora${sid} ${primaryhost} "tail -1 /oracle/$ORACLE_SID/sapbackup/back$ORACLE_SID.log" However i would like to tail the line last... (4 Replies)
Discussion started by: suri.tyson
4 Replies

5. Shell Programming and Scripting

Piping tail to awk to parse a log file

Hello all, I've got what I'm pretty sure is a simple problem, but I just can't seem to work past it. I'm trying to use awk to pretty up a log file, and calculate a percentage. The log file looks like this: # tail strtovrUsage 20090531-18:15:45 RSreq - 24, RSsuc - 24, RSrun - 78, RSerr -... (4 Replies)
Discussion started by: DeCoTwc
4 Replies

6. Shell Programming and Scripting

how to track a log file of one process and mail that logfile to a group?

Hi Friendz, I have 14 DB load scripts say 1,2,3....14. I want a script to call each script automatically, and after completion of every script, it needs to track the logfile and mail that log file to a group.and again it should run the next script in sequence 1,2,3...14 Please help me,need... (1 Reply)
Discussion started by: shirdi
1 Replies

7. Shell Programming and Scripting

generate logfile in a shell script

Unix Gurus, I have a shell script which has few "echo" statements. I am trying to create a logfile where all the outputs of the echo statement sare stored. I will have to add this as the final step in the existing script so that everytime the script runs, a logfile is generated with all the... (1 Reply)
Discussion started by: shankar1dada
1 Replies

8. Shell Programming and Scripting

How to tail -f multi logfile in 1 shell script.?

Hello, How to tail -f multi logfile from multi path in 1 shell script. File & Path /usr/home/localmode/mode110l/log/logic/number110/digit110_digit110m4_2013050210.txt /usr/home/localmode/mode103l/log/logic/number103/digit103_digit103m4_2013050210.txt... (4 Replies)
Discussion started by: ooilinlove
4 Replies

9. Shell Programming and Scripting

How to process only new line of tail -f command from live log file?

Hi, I want to read a live log file line by line and considering those line which are newly added to file Below code I am using, which read line but as soon as it read new line from log file its starts processing from very first line of file. tail -F /logs/COMMON-ERROR.log | while read... (11 Replies)
Discussion started by: ketanraut
11 Replies

10. UNIX for Advanced & Expert Users

Alternative to tail -n -0 -F for monitoring live log file

Hello, I have been working on script which need to generate an alert based upon live logs. If string is found then an alert mail must triggered. tail -n -0 -F works fine to redirect the each latest line from live logs file to grep a pattern for matching but it seems to be not working on... (7 Replies)
Discussion started by: ketanraut
7 Replies
ROBOTS(6)							 BSD Games Manual							 ROBOTS(6)

NAME
robots -- fight off villainous robots SYNOPSIS
robots [-Asjtan] [scorefile] DESCRIPTION
robots pits you against evil robots, who are trying to kill you (which is why they are evil). Fortunately for you, even though they are evil, they are not very bright and have a habit of bumping into each other, thus destroying themselves. In order to survive, you must get them to kill each other off, since you have no offensive weaponry. Since you are stuck without offensive weaponry, you are endowed with one piece of defensive weaponry: a teleportation device. When two ro- bots run into each other or a junk pile, they die. If a robot runs into you, you die. When a robot dies, you get 10 points, and when all the robots die, you start on the next field. This keeps up until they finally get you. Robots are represented on the screen by a '+', the junk heaps from their collisions by a '*', and you (the good guy) by a '@'. The commands are: h move one square left l move one square right k move one square up j move one square down y move one square up and left u move one square up and right b move one square down and left n move one square down and right . (also space) do nothing for one turn HJKLBNYU run as far as possible in the given direction > do nothing for as long as possible t teleport to a random location w wait until you die or they all do q quit ^L redraw the screen All commands can be preceded by a count. If you use the 'w' command and survive to the next level, you will get a bonus of 10% for each robot which died after you decided to wait. If you die, however, you get nothing. For all other commands, the program will save you from typos by stopping short of being eaten. How- ever, with 'w' you take the risk of dying by miscalculation. Only five scores are allowed per user on the score file. If you make it into the score file, you will be shown the list at the end of the game. If an alternative score file is specified, that will be used instead of the standard file for scores. The options are -s Don't play, just show the score file. -j Jump, i.e., when you run, don't show any intermediate positions; only show things at the end. This is useful on slow terminals. -t Teleport automatically when you have no other option. This is a little disconcerting until you get used to it, and then it is very nice. -a Advance into the higher levels directly, skipping the lower, easier levels. -A Auto-bot mode. Lets the game play itself. -n Increase the number of games played by one. AUTHOR
Ken Arnold Christos Zoulas (autobot mode) FILES
/var/games/robots_roll the score file BUGS
Bugs? You crazy, man?!? BSD
May 31, 1993 BSD
All times are GMT -4. The time now is 11:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy