LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-06-2018, 11:54 AM   #1
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 83

Rep: Reputation: 15
EOL's missing when I cat /var/logs/messages


I'm surprised that eol's are missing with

Code:
# cat /var/logs/messages | grep "SELinux"
Am I missing some in the syntax?

\rtc
 
Old 04-06-2018, 12:25 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by rtcary View Post
I'm surprised that eol's are missing with
Code:
# cat /var/logs/messages | grep "SELinux"
Am I missing some in the syntax?
Command is correct, but you don't say what terminal you're using to execute it, on what platform. Incorrect tty settings and/or doing this from Windows may affect the EOL's.
 
Old 04-06-2018, 12:56 PM   #3
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 83

Original Poster
Rep: Reputation: 15
I'm using the terminal on my Centos 7 server.

Thank you...

\rtc
 
Old 04-06-2018, 01:05 PM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
try just
Code:
 cat /var/logs/messages
then look for your pattern to see if it is even within your file.
Code:
# grep -rwn /var/log/trim.log -e time
works too, provided the pattern one is looking for is actually in the file in order to get a return.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/var/log/messages are flooded with WIFI logs DBabo Linux - Hardware 6 08-25-2012 11:39 PM
[SOLVED] No /var/log/messages , syslog , kern.log -but cat /var/spool/octopussy/octo_fifo masuch Linux - Newbie 4 06-13-2012 08:05 PM
Dumping /var/log./messages using 'cat' is failing greplinux Linux - Newbie 2 11-16-2010 12:48 PM
Separating WPA logs from /var/log/messages using syslog-ng lp449 Linux - Newbie 1 06-04-2008 06:12 AM
strange logs in /var/log/messages dominant Linux - Security 1 04-21-2004 12:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:11 PM.

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