LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-28-2012, 11:27 AM   #1
vaibhavs17
Member
 
Registered: Mar 2009
Posts: 49

Rep: Reputation: 1
monitor continous moving file in unix


Hi Team,

I would like to know, one process (shell script) is running and it is keep on writing the logs into the log file. How can we get the current updated logs?

other than tail -linecount filename

Thanks,
Vaibhav
 
Old 06-28-2012, 11:43 AM   #2
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,396

Rep: Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759
Would watch be the kind of things you are after:
Code:
watch tail <filename>
will show you the last lines of the file and update when more line are written.
 
1 members found this post helpful.
Old 06-28-2012, 11:48 AM   #3
montel
Member
 
Registered: Jun 2012
Location: Canada
Distribution: Ubuntu/Debian/CentOS
Posts: 45

Rep: Reputation: 18
Alternatively, you can use:

Code:
tail -f <filename>
This will "follow" the log, outputting the latest logs onto the screen as they get written to the file.
 
2 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Keep Moving. No Unix Here. LXer Syndicated Linux News 0 05-06-2010 08:00 AM
Moving from UNIX to Linux brasscrest LinuxQuestions.org Member Intro 1 01-15-2010 08:43 AM
moving files in hp unix scofiled83 Programming 10 05-22-2009 09:50 AM
LXer: Migrating and Moving UNIX Filesystems LXer Syndicated Linux News 0 07-22-2006 02:33 AM
Moving out of SCO Unix any distros?? Frost Linux - Distributions 20 06-02-2005 11:08 PM


All times are GMT -5. The time now is 06:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration