[Archivesspace_Users_Group] logrotate and "binary" logs

Peter Heiner ph448 at cam.ac.uk
Wed Jun 16 12:44:00 EDT 2021

> On Tue, 2021-06-15 at 08:42 +0000, Peter Heiner wrote:
> > > $ file as-log.out
> > > as-log.out: data
> > This looks like the file utility was unable to determine the type of
> > as-log.out. As it should normally be able to identify all types emitted
> > by logrotate, this suggests to me that the actual file it was ran on is
> > corrupt.
> I'm not sure about corrupt, but I won't rule it out. I'm not sure
> because `cat`, `tail`, and some other utilities seem to work correctly
> (but maybe they're more forgiving?). Thanks for the suggestion!

If other utilities work well with the file, meaning for example that less
or tail do not complain that the file may be binary, then I wouldn't worry
too much about it.
It's also possible for different contents in the file to yield different results.
Identifying log files certainly seems capricious on my laptop:

[ph448 at sparkly log]$ file pacman.log 
pacman.log: Unicode text, UTF-8 text
[ph448 at sparkly log]$ file xdm.log
xdm.log: ASCII text
[ph448 at sparkly log]$ file Xorg.0.log
Xorg.0.log: JSON data

All 3 files are plaintext logs. 


More information about the Archivesspace_Users_Group mailing list