Unix tail-like lister (or watch how a text file changes)

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
membrillo
Junior Member
Junior Member
Posts: 8
Joined: 2004-05-05, 07:04 UTC

Unix tail-like lister (or watch how a text file changes)

Post by *membrillo »

If you have to watch a file (usually a log file) to follow the appended data, it is very useful de tail -f unix command.

In windows world we don't have this tool, so it would be great that TC could do this.

This could work as a lister window, reading periodically last bytes of the watched file, and showing them.

And it could be extended to follow changes in more than one file, organizing the windows (each window showing one file) as a cascade to be able to see how all files change, or using tabs,...
User avatar
SanskritFritz
Power Member
Power Member
Posts: 3693
Joined: 2003-07-24, 09:25 UTC
Location: Budapest, Hungary

Post by *SanskritFritz »

I switched to Linux, bye and thanks for all the fish!
User avatar
jaco
Junior Member
Junior Member
Posts: 55
Joined: 2006-11-15, 10:15 UTC
Location: Amsterdam
Contact:

Post by *jaco »

In windows world we don't have this tool,
I sometimes use this one:

http://infiero.com/tailxp/index.html
Stas Agarkov
Junior Member
Junior Member
Posts: 2
Joined: 2007-06-07, 08:29 UTC
Location: Belgorod
Contact:

Post by *Stas Agarkov »

TailXP not work with unix way line end (0x0A)!
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

GNU: UnxUtils or the same collection from google gears that has a handful of updated/extra binaries.
_type.exe [renamed from type.exe]
agrep.exe
ansi2knr.exe
basename.exe
bc.exe
bison.exe
bunzip2.exe
bzip2.exe
bzip2recover.exe
cat.exe
chgrp.exe
chmod.exe
chown.exe
cksum.exe
cmp.exe
comm.exe
compress.exe
cp.exe
csplit.exe
cut.exe
dc.exe
dd.exe
df.exe
diff.exe
diff3.exe
dircolors.exe
dirname.exe
du.exe
egrep.exe
env.exe
expand.exe
expr.exe
factor.exe
fgrep.exe
flex.exe
fmt.exe
fold.exe
fsplit.exe
gawk.exe
gclip.exe
gdate.exe [renamed, from date.exe]
gecho.exe [renamed, from echo.exe]
gfind.exe
gplay.exe
grep.exe
gsort.exe [renamed, from sort.exe]
gunzip.exe
gzip.exe
head.exe
id.exe
indent.exe
install.exe
join.exe
jwhois.exe
less.exe
lesskey.exe
ln.exe
logname.exe
ls.exe
m4.exe
make.exe
makedepend.exe
makemsg.exe
man.exe
md5sum.exe
mkdir.exe
mkfifo.exe
mknod.exe
mv.exe
mvdir.exe
nl.exe
od.exe
paste.exe
patch.exe
pathchk.exe
pclip.exe
pr.exe
printenv.exe
printf.exe
ptx.exe
pwd.exe
qclip.exe
recode.exe
rm.exe
rman.exe
rmdir.exe
sclip.exe
sdiff.exe
sed.exe
seq.exe
sha1sum.exe
shar.exe
sleep.exe
split.exe
stego.exe
su.exe
sum.exe
sync.exe
tac.exe
tail.exe
tar.exe
tee.exe
test.exe
touch.exe
tr.exe
tsort.exe
uname.exe
unexpand.exe
uniq.exe
unrar.exe
unshar.exe
unzip.exe
uudecode.exe
uuencode.exe
wc.exe
wget.exe
which.exe
whoami.exe
xargs.exe
yes.exe
zcat.exe
zip.exe
Stas Agarkov
Junior Member
Junior Member
Posts: 2
Joined: 2007-06-07, 08:29 UTC
Location: Belgorod
Contact:

Post by *Stas Agarkov »

Than you very much!! Cool!
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

With the functionality of UnxUtils, I've pretty much been able to forgo installing Cygwin. Plus I've found a number of interesting ways to utilize gawk within batch files.

A snippet from my MakeList2.cmd

Code: Select all

FOR /F "tokens=1-4* delims= " %%B IN ('DIR /A-D /ON') DO (
	FOR /F "tokens=1-3 delims=/" %%X IN ("%%B") DO (
		IF NOT "%%~Z" == "" (
			ECHO "%%F"?%%E >> %output%.len
		) ELSE (
			IF "%%~C"=="File(s)" ( 
				SET totalFiles=%%B
				SET totalBytes=%%D
			)
		)
	)
)

SET gStrlen=		^"{	len=length($1); siz=length($2);
SET gStrlen=%gStrlen%		if( len > maxlen ) maxlen=len;
SET gStrlen=%gStrlen%		if( siz > maxsiz ) maxsiz=siz; 
SET gStrlen=%gStrlen% } END { print maxlen + maxsiz; }"

FOR /F %%S IN ('type %output%.len ^| gawk.exe -F? %gStrlen%') DO SET maxlen=%%S
bedac
New Member
New Member
Posts: 1
Joined: 2009-10-31, 17:14 UTC

Post by *bedac »

I often use BareTail from Bare Metal Software for monitoring.
There is a freeware version as well as a 'pro' version.
andres992
Member
Member
Posts: 124
Joined: 2006-04-12, 21:26 UTC

Post by *andres992 »

I have used this one, called Dynamic Log Viewer

http://mx-3.cz/go.php?page=logview.htm&language=en

Its version 1.3.1 is quite comfortable for log monitoring realtime in UTF-8.
#68776 Personal Licence
User avatar
Impeeza
Junior Member
Junior Member
Posts: 24
Joined: 2004-04-30, 15:04 UTC

I support the idea

Post by *Impeeza »

Sorry for revitalize this thread, but I think this is a wonderful Idea, lot of times I need this functionality, my workaround is keep pressing [F2] and [End] constantly on file logs I am monitoring, but sometimes get tired :P.

The use of third party software is no work for me, I really don't want to buy extra software.

O hope Ghisler could help us.

Regards.
Impeeza jaja
Timerider
Junior Member
Junior Member
Posts: 5
Joined: 2009-02-20, 14:38 UTC

Re: Unix tail-like lister (or watch how a text file changes)

Post by *Timerider »

Hi,
I agree with this most useful of features - I regularly view log files and would love it if "tail -f" would make it into the standard TC viewer.
I've not found a simple plugin that does just that.
Regards,
Timerider
User avatar
Helix751
Senior Member
Senior Member
Posts: 228
Joined: 2004-06-16, 21:16 UTC

Re: Unix tail-like lister (or watch how a text file changes)

Post by *Helix751 »

Timerider wrote: 2021-05-05, 10:18 UTC Hi,
I agree with this most useful of features - I regularly view log files and would love it if "tail -f" would make it into the standard TC viewer.
I've not found a simple plugin that does just that.
Regards,
Timerider
Try these:

1. LogTail 0.1.1.12 https://totalcmd.net/plugring/logtail.html
Pros:
- Opens up at the bottom of the file (a MUST and VERY useful for log files!)
- Follows 'tail' (autoreloads upon change). Follow option can be toggled)
- Has color coding for errors and warning based on text search
Cons:
- It's so old it doesn't have auto-installation .inf.
- Plugin is VERY old but it works
- x32 version only.
- The follow file changes keep the screen scrolling up even when manually trying to scroll and view previous sections. There's no auto-pause for scrolling. This can be circumvented by stopping scrolling (Ctrl-T).
- The plugin generates a growing log file (procedures.log) of its own in TCMD's main folder while it's active. Although it can be used for file testing, it's pretty useless and somehow annoying.

2. LogViewer 1.1.2 https://totalcmd.net/plugring/LogViewer.html
Pros:
- Search function
- Color coding for errors/warnings.
Cons:
- Doesn't open at the bottom of the file (useful for log files).
- Doesn't follow file changes (no autoreload).

Overall, LogTail is better imho for what is intended: Viewing log files, but I keep both installed just in case.

Hope this helps.
Regards,
Sergio

TCmd license #12059
TC11.00x86/x64 | Win11 Pro
User avatar
vdijken
Member
Member
Posts: 181
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: Unix tail-like lister (or watch how a text file changes)

Post by *vdijken »

I do it this way on the command line:
program |wtee program.log
You see the output on the screen and it goes into a log file. Only look for wtee on the internet.
Post Reply