Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Live/real-time text-file updates in terminal Post 302386791 by guitarscn on Wednesday 13th of January 2010 02:36:22 PM
Old 01-13-2010
Live/real-time text-file updates in terminal

I want to have a terminal open and have something like a "repeating cat" command running in it for a certain text file (in particular /var/log/system.log). So my terminal will scan or cat the text file every so often or whenever the text file system.log gets written to by the system, it will display whatever it wrote to the file in my terminal that is open.
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Piped open not real-time - How would one handle live data?

When I run "/etc/myApp" I am presented with continuous output, just about once per second. However when I try to get the information in Perl via a piped open, it waits till the end to give me anything... my code: open (OUTPUT,"/etc/myApp |"); while (<OUTPUT>){ print $_; }... (2 Replies)
Discussion started by: jjinno
2 Replies

2. Shell Programming and Scripting

Real time log file redirect

Hi all, i would like to write the shell script program, it can monitor the access_log "real time" when the access_log writing the line contain "abcdef" the program will be "COPY" this line into a file named "abcdef.txt", do the same thing if the contain "123456" "COPY" it into a file named... (3 Replies)
Discussion started by: eric_wong_ch
3 Replies

3. Shell Programming and Scripting

How to tail -f real time file.

How to tail -f real time file. I want to tail file created last time. The server is gen new file Always. . An example file. -rw-r--r-- 1 shinnie tiituck 251M Oct 18 05:39 20111018_00.log -rw-r--r-- 1 shinnie tiituck 251M Oct 18 11:18 20111018_01.log -rw-r--r-- 1 shinnie tiituck... (3 Replies)
Discussion started by: ooilinlove
3 Replies

4. Web Development

How to implement real time updates and interactive chats in a webpage

I want to build a website.. All i know is shell and perl programming.. so i started with perl cgi and was successful in developing a page that asks username and password and authenticates the user... Now can some one tell me how to add IRC(interactive chat) and real time updates to my webpage,... (2 Replies)
Discussion started by: Arun_Linux
2 Replies

5. Shell Programming and Scripting

How to tail real time file Generated every hour?

Hi Guys, I am developing a script to monitor log file Generated every hour. When creating a new file scripts not working. My Code . I want to monitor GatewayTransaction.yyyymmdd-hh.log while true; do newdate=$(date '+%Y%m%d') ; nowdate=$(date '+%Y%m%d-%H.log'); tail -f... (7 Replies)
Discussion started by: ooilinlove
7 Replies

6. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

7. What is on Your Mind?

Update: UserCP Screeching Frog 0.7641 - Changed Live Chat to Live Updates

Update: UserCP Screeching Frog 0.7641 - Changed Live Chat to Live Updates In this version of the UserCP, I have changed "Live Chat" to "Live Updates" by disabling the ability to post in the "live chat" area and changed the name to "Live Updates" The reason for this change is that experienced... (6 Replies)
Discussion started by: Neo
6 Replies
WHO(1)							    BSD General Commands Manual 						    WHO(1)

NAME
who -- display who is logged in SYNOPSIS
who [-abdHlmqrstTuv] [file] who am i DESCRIPTION
The who utility displays a list of all users currently logged on, showing for each user the login name, tty name, the date and time of login, and hostname if not local. Available options: -a Same as --bdlprTtuv. -b Time of last system boot. -d Print dead processes. -H Write column headings above the regular output. -l Print system login processes. -m Only print information about the current terminal. This is the POSIX way of saying who am i. -p Print active processes spawned by init(8). -q ``Quick mode'': List only the names and the number of users currently logged on. When this option is used, all other options are ignored. -r Print the current runlevel. Supported runlevels are: d (DEATH) The system has halted. s (SINGLE_USER) The system is running in single user mode. r (RUNCOM) The system is executing /etc/rc. t (READ_TTYS) The system is processing /etc/ttys. m (MULTI_USER) The system is running in multi-user mode. T (CLEAN_TTYS) The system is in the process of stopping processes associated with terminal devices. c (CATATONIA) The system is in the process of shutting down and will not create new processes. -s List only the name, line and time fields. This is the default. -T Print a character after the user name indicating the state of the terminal line: '+' if the terminal is writable; '-' if it is not; and '?' if a bad line is encountered. -t Print last system clock change. -u Print the idle time for each user, and the associated process ID. -v When printing of more information is requested with -u, this switch can be used to also printed process termination signals, process exit status, session id for windowing and the type of the entry, see documentation of ut_type in getutxent(3). am I Returns the invoker's real user name. file By default, who gathers information from the file /var/run/utmpx. An alternative file may be specified which is usually /var/log/wtmpx (or /var/log/wtmp, or /var/log/wtmpx.[0-6] or /var/log/wtmp.[0-6] depending on site policy as wtmpx can grow quite large and daily ver- sions may or may not be kept around after compression by ac(8)). The wtmpx and wtmp file contains a record of every login, logout, crash, shutdown and date change since wtmpx and wtmp were last truncated or created. If /var/log/wtmpx or /var/log/wtmp are being used as the file, the user name may be empty or one of the special characters '|', '}' and '~'. Logouts produce an output line without any user name. For more information on the special characters, see utmp(5). FILES
/var/run/utmp /var/run/utmpx /var/log/wtmp /var/log/wtmp.[0-6] /var/log/wtmpx /var/log/wtmpx.[0-6] SEE ALSO
last(1), mesg(1), users(1), getuid(2), utmp(5), utmpx(5) STANDARDS
The who utility is expected to conform to IEEE Std 1003.2-1992 (``POSIX.2''). HISTORY
A who utility appeared in Version 6 AT&T UNIX. BSD
January 17, 2007 BSD
All times are GMT -4. The time now is 11:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy