LinuxQuestions.org
Visit Jeremy's Blog.
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-12-2012, 01:59 PM   #1
TyraMic
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Rep: Reputation: Disabled
Unhappy Cant check system logs


Hi,

I am new to Linux and I have been given the task of checking the system log for errors. I log into Linux and I type the following but I get a message saying that /Var is a directory and nothing more. Here is what I am typing:

cd /var /log then at the next prompt I type
log and I get and error.

I also try to use grep 'error' syslog.log and I get an error.

can some one help me figure out what I am doing wrong.

Thanks
 
Old 11-12-2012, 03:40 PM   #2
z99
Member
 
Registered: Aug 2009
Location: Iran-Sari
Distribution: CentOS,Fedora,Slitaz
Posts: 136

Rep: Reputation: 20
Ex:
Quote:
sudo cat /var/log/yum.log
or any log file
 
Old 11-12-2012, 03:47 PM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by TyraMic View Post
can some one help me figure out what I am doing wrong.
You're trying to run before you can walk. You need to learn some (very) rudimentary basics of how the filesystem works (hint, as mentioned above most log files are in /var/log -- /log refers to a directory that's a subdirectory of the root directory [/] not of /var). I'd suggest heading over to tldp.org and read some of their introductory guides.
 
Old 11-12-2012, 04:14 PM   #4
clocker
Member
 
Registered: Sep 2011
Distribution: fedora, redhat, mint
Posts: 87

Rep: Reputation: Disabled
Quote:
You're trying to run before you can walk.
When you do right linux does nothing, but when you do wrong linux slaps you at the back. To view any file you need to cat,vi or find a program to help you do that. but cd will will just move you around in directories which is what you did. Some files may need root rights to access them i think thats why z99 used sudo.
 
Old 11-13-2012, 01:22 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,395

Rep: Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395Reputation: 2395
Here's a good tutorial
http://rute.2038bug.com/index.html.gz

Type these (exactly) and post the results, so we can see
Code:
cat /etc/*release*

uname -a

id
NB: Linux is case sensitive.

You said you typed
Code:
cd /var /log
but that leaves a space in the path /var/log; don't put a space there.

When you ask a question, show us EXACTLY what you typed and EXACTLY what msgs you got.
http://catb.org/~esr/faqs/smart-questions.html
 
Old 11-13-2012, 03:43 AM   #6
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
you need to list all the logs file first on your /var/log
cd /var/log
ls -ltr

show us the results and what errors you want to see, and will help you
 
Old 11-13-2012, 09:47 AM   #7
TyraMic
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thanks for all the responses I will try and utilize everthing that was offered, especailly the tutorials. I will try suggestions and let you know what happens.
 
Old 11-15-2012, 08:42 AM   #8
TyraMic
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi Everyone,

Just wanted to thank you for your help. I tried all of your suggestions and I can report that I have found the log files. You have all been wonderful.

again thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Check mail server logs? Zeno McDohl Linux - Newbie 18 12-24-2006 04:30 PM
Logs: What to check and where to find them? Swakoo Linux - General 2 01-12-2006 03:35 AM
Computer Reboots - What Logs Should I Check? MoghNX01 Linux - Newbie 6 12-15-2005 11:09 AM
Perl Script To Check Logs Crashed_Again Programming 0 11-13-2004 03:13 PM
what logs do I check? mehesque Linux - Newbie 1 02-12-2004 07:26 PM

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

All times are GMT -5. The time now is 03:48 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration