You are not logged in.

#1 2013-06-20 14:18:13

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Can't read log files from /var/log with Geany

With the few exeptions like hibernate.log, I can't read most of those files, including:
everything.log
errors.log
kernel.log
messages.log
syslog.log

When I try to open them (as root), all I get is

The file xxx.log does not look like a text file or the file encoding is not supported.

However, they do open with nano

Last edited by Lockheed (2013-06-20 14:20:11)

Offline

#2 2013-06-20 15:43:29

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: Can't read log files from /var/log with Geany

They probably contain some non-UTF-8 byte sequences and are therefore treated as binary files. Check with

$ file <path>

Nano doesn't care.

Offline

#3 2013-06-20 16:16:46

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't read log files from /var/log with Geany

Yeah, it says it's data. But nano is quite useless for very long text files, which is why I'm trying geany

Offline

#4 2013-06-20 18:39:51

msthev
Member
Registered: 2012-04-05
Posts: 177

Re: Can't read log files from /var/log with Geany

If you want to only view the files (I assume this since those are logs), maybe try

$ less -M <file>

You can navigate pretty well with it (e.g. go to a specific line).


Edit:
You could also try to find if there is an option in Geany that would allow you to see "non-text" files.

Last edited by msthev (2013-06-20 18:41:27)

Offline

#5 2013-06-20 18:57:05

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Can't read log files from /var/log with Geany

It looks like they removed that function some time ago from geany.

Thanks for the tips.

Offline

Board footer

Powered by FluxBB