-   Linux - Newbie (
-   -   Dumping /var/log./messages using 'cat' is failing (

greplinux 11-15-2010 09:29 AM

Dumping /var/log./messages using 'cat' is failing

I am trying to dump /var/log/messages using cat command, but it is failing.

[root@greplinux-linux ~]# cat /var/log/messages

cat: /var/log/messages: Invalid argument

messages file is present in /var/log. When I tried to open that using 'vi' it is saying 'messages' is not a file.

First column of command "ls -l /var/log/messages" is '?rwsrwsrwt'.

What is that I am doing wrong? Please guide me.

Thanks in advance

stress_junkie 11-15-2010 09:51 AM

This is my messages file.

$ ls -l /var/log/messages
-rw-r----- 1 syslog adm 1543 2010-11-15 08:37 /var/log/messages

Looks like something messed up your file. Maybe you should fsck the disk.

werewolfy 11-16-2010 12:48 PM

Hm... seems like the file mode bits are messed up (rwsrwsrwt means that every possible bit is set there).


chmod 644 /var/log/messages

and look if this changes them back to

The "?" in front of the mode doesn't look good either... did you check your disk like 'stress_junkie' already proposed?

Any other files in /var/log or elsewhere with the same symptoms?

All times are GMT -5. The time now is 03:28 AM.