![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tail display ....in perl | zedex | Shell Programming and Scripting | 2 | 01-15-2008 10:10 AM |
| how to display line number for tail -f | iengca | UNIX for Dummies Questions & Answers | 4 | 12-13-2007 08:46 AM |
| MatLab alike software in Fedora | MULTIVERSE | Ubuntu | 1 | 09-14-2007 09:22 AM |
| Display Directory Size - DF? | t4st33@mac.com | UNIX for Dummies Questions & Answers | 3 | 01-11-2007 02:12 AM |
| Constantly updating log files (tail -f? grep? awk?) | nortonloaf | UNIX for Dummies Questions & Answers | 0 | 12-03-2006 11:20 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
The system I work on, produces several kinds of status-files in a single directory. I would like to be able to see the files as they are added to this directory.
I was wondering if it would be possible to get a "tail -f" alike view of the ls-command, in such a way that a newly added file is automagically added at the bottom. The way we do it now, is with the command below, which we need to execute manually (which imho is not handy): ls -l -rt|tail -20 (to view 20 last files) And we do more "in depth" searches inside these files with: ls -l -rt tail `grep -l searchstring *` But it would be wonderful to just see the list "grow" since this way, it is much easier to recognize errormessages since these errormessages are fixed size, 645 bytes and easy to spot. We use SunOS 5.7 with Bash 2.01. |
|
|||||
|
Linux provides a utility called "watch" which you could use to do this. Something like:
watch "ls -lrt | tail -5" would give you a constantly updated list of the 5 most recently updated files. Unfortunately, I dont think this utility is included with Solaris. It is part of the procps package on Linux. You could try downloading it (http://procps.sourceforge.net/) and compiling for your architecture. |
|
||||
|
I do remember watch now! Have not used it in quite some time. I run mostly FreeBSD, OpenBSD and Solaris nowadays and didn't even miss it (until now!)...
Quote:
Quote:
Getting permission to install additional software on it would require a lot of people to agree with it and I don't think that will happen in the near future. Thanks for the reply! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|