tail -f monitoring


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting tail -f monitoring
# 1  
Old 06-19-2008
tail -f monitoring

Is there any file on UNIX that changes periodically so that I could use tail -f command to watch changes? I was searching a long time and I didn't find nothing (I'm newbie to UNIX so it's not a surprise to me though)

Thanks for help Smilie
# 2  
Old 06-19-2008
Wait, are you just looking for a random file that is constantly appending itself so you can watch it change? I'm not sure I'm understanding what your goal is here.
# 3  
Old 06-19-2008
well, I'm looking for a system file that periodically changes or at least quite often.
# 4  
Old 06-19-2008
/var/log/messages
/var/log/maillog
/var/log/squid/access_log
/var/log/httpd/error.log
/var/log/httpd/access.log


And lot more...
# 5  
Old 06-20-2008
Thank you for reply

I didn't find the files, I have a "student" account but even so I should be able to see them, shouldn't I? They are not hidden, I tried ls -a
# 6  
Old 06-20-2008
If it is just to test the tail -f command, you can make a little script that will write the current date into a file and watching it with tail -f

Put this in a file:
Code:
#!/bin/sh

while true; do
        sleep 5
        date >> /tmp/dte
done

Make that file executable (chmod +x that-file), execute it and watch the result in another session with tail -f /tmp/date.

To stop the script: CTRL-C in the session where you executed the file.
# 7  
Old 06-21-2008
Thank you!

I was looking for a file because it would be easier than two sessions Smilie But this will do the job too.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Tail +

because the tail +2 on the first line gives me the file name pomga I do not want anything like what I miss tail +2 ejemplo.txt ouput ==> ejemplo.txt <== 1 2 3 4 5 6 7 8 9 10 (2 Replies)
Discussion started by: tricampeon81
2 Replies

2. 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

3. Shell Programming and Scripting

Joining multiple files tail on tail

I have 250 files that have 16 columns each - all numbered as follows stat.1000, stat.1001, stat.1002, stat.1003....stat.1250. I would like to join all 250 of them together tail by tail as follows. For example stat.1000 a b c d e f stat.1001 g h i j k l So that my output... (2 Replies)
Discussion started by: kayak
2 Replies

4. Shell Programming and Scripting

using tail -f and tr in a script

I have file that is being constantly written to example: file.txt ABC EBC ZZZ ABC I am trying to create a simple script that will tail this file and at the same time using tr to change B to F on lines containing 'B'. I tried this and it doesn't seem to work. #!/bin/bash tail -f... (8 Replies)
Discussion started by: zerofire123
8 Replies

5. Shell Programming and Scripting

tail -f

I am trying to extract a particular line from a.log which keeps appending every sec and output that into a newfile b.log which should append itself with filtered data received from a.log I tried tail -f a.log |grep fail| tee -a b.log nothing in b.log tail -f a.log |grep fail >>b.log ... (4 Replies)
Discussion started by: wannalearn
4 Replies

6. Shell Programming and Scripting

Tail??

Hello all, I have search the forum and could not find an answer...Here is what I am trying to do. Every 15 minutes, a script send uptime output to a logfile (dailylog.log), that file contains lines like the one below: 11:21am up 44 days, 19:15, 1 user, load average: 0.00, 0.02, 0.03 ... (7 Replies)
Discussion started by: qfwfq
7 Replies

7. Shell Programming and Scripting

tail command..

I was wondering how can I do this I have file myfile.txt wc -l is: 5 000 000 I have to remove first 1 000 000 lines from header.. I tryed with tail -4000000 myfile.txt>newfile.txt but it does not work... any help?? (2 Replies)
Discussion started by: amon
2 Replies

8. UNIX for Dummies Questions & Answers

how to sed with tail

hi, I am searching error and exception in my log and >> to report file, my code is : sed -n '//p;//p' $ARIBA_LOG_DIR/MyLog.txt >> $LOG_ERR_REP I need to report avove 5 line, that line and bellow 5 line.. what change is required in my code? (1 Reply)
Discussion started by: redlotus72
1 Replies

9. Shell Programming and Scripting

using tail -f

Working in HP-UX 10.20. I eventually want to write a bourne shell script to handle the following problem, but for now I am just toying with it at the command line. Here's what I am basically trying to do: tail -f log_X | grep n > log_Y I am doing a tail -f on log_X . Once it sees "n", I... (6 Replies)
Discussion started by: cdunavent
6 Replies
Login or Register to Ask a Question