LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-15-2010, 09:29 AM   #1
greplinux
Member
 
Registered: Jun 2007
Posts: 118

Rep: Reputation: 17
Dumping /var/log./messages using 'cat' is failing


Hi,

I am trying to dump /var/log/messages using cat command, but it is failing.
Quote:
Command:
[root@greplinux-linux ~]# cat /var/log/messages

Op:
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
 
Old 11-15-2010, 09:51 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
This is my messages file.
Code:
$ 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.
 
Old 11-16-2010, 12:48 PM   #3
werewolfy
LQ Newbie
 
Registered: Dec 2007
Posts: 15

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

try

chmod 644 /var/log/messages

and look if this changes them back to
rw-r--r--

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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/adm/messages vs /var/log/messages gomes1333 Linux - General 1 04-06-2010 04:08 AM
/var/log/messages and /var/log/cron not working sigkill Linux - Software 6 08-09-2008 01:08 PM
Redirecting the kernel messages to file other than /var/log/messages jyotika_b83 Linux - General 3 04-28-2005 06:39 PM
From where am i getting error messages to /var/log/messages? prabhuacsp Linux - Networking 1 02-16-2005 12:34 AM
/var/log/messages full of these messages. Should I be concerned? mdavis Linux - Security 5 04-16-2004 10:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration