LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 01-27-2004, 08:53 PM   #1
WannaLearnLinux
Member
 
Registered: May 2003
Location: California
Distribution: Slax
Posts: 262

Rep: Reputation: 31
Question rm /var/log/boot.log


Please can someone tell me if it is possible remove boot.log ?

I need to see boot log when reboot in little bit.

Thank you,

 
Old 01-27-2004, 09:16 PM   #2
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
Could you please be a little more specific? You want to remove an important part of your system because.....?
 
Old 01-27-2004, 09:50 PM   #3
WannaLearnLinux
Member
 
Registered: May 2003
Location: California
Distribution: Slax
Posts: 262

Original Poster
Rep: Reputation: 31
oopps

i thought when I remove I'll remove only log.Which is kinda long.

I want to have new clean log when I reboot soon.

Sorry just
 
Old 01-27-2004, 10:46 PM   #4
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
cat /dev/null > /var/log/boot.log
this will replace /var/log/boot.log with an empty document of the same name
 
Old 01-27-2004, 11:14 PM   #5
WannaLearnLinux
Member
 
Registered: May 2003
Location: California
Distribution: Slax
Posts: 262

Original Poster
Rep: Reputation: 31
thanx mikshaw

I appreciate your help. I almost erased it.

Thanks a lot

I write it down.
 
Old 01-27-2004, 11:55 PM   #6
Jose Muņiz
Member
 
Registered: Jul 2003
Location: Mexico City
Distribution: Slackware 9.1, SuSE 9.1
Posts: 248

Rep: Reputation: 32
You could use the

cat /var/log/boot.log | tail -20

to see the most recent add-ons to your log. In that way you won't have to delete the whole thing. Or maybe make a script that will save the old logs to some other file?

say something like:

#! /bin/bash

cat /var/log/boot.log >> /home/username/boot.backup
cat /dev/null > /var/log/boot.log

Every time you run that script, your /var/log/boot log will be cleaned, and you will have everything in /home/username/boot.backup.
 
Old 01-28-2004, 01:07 AM   #7
WannaLearnLinux
Member
 
Registered: May 2003
Location: California
Distribution: Slax
Posts: 262

Original Poster
Rep: Reputation: 31
thanx Jose

Thanx for tip Jose.

This is good idea.

Learning everyday
 
Old 01-28-2004, 07:56 PM   #8
WannaLearnLinux
Member
 
Registered: May 2003
Location: California
Distribution: Slax
Posts: 262

Original Poster
Rep: Reputation: 31
thanx again

Quote:
Originally posted by mikshaw
cat /dev/null > /var/log/boot.log
this will replace /var/log/boot.log with an empty document of the same name

This is what I'm looking for,it works just perfect.Now it is easier to read this log
 
Old 01-28-2004, 08:21 PM   #9
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
I only recommended this as an alternative to removing the file entirely. You'll find sometimes that programs are not created with a failsafe plan in the event that a file doesn't exist. I'm not sure how boot logging works, but it's possible that if you removed the file you would end up with no log at all.
 
  


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/log/boot.log doesn't exist??? big_gie Fedora 5 05-17-2008 05:44 AM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
Strange results in /var/log/apache/access.log subt13 Linux - Security 2 08-03-2004 01:21 PM
pppd logging to /var/log/ppp.log problem mrtwice Linux - Software 1 01-10-2004 05:38 PM
iptables, changing log file from /var/log/messages acid2000 Linux - Networking 3 03-11-2003 08:38 PM

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

All times are GMT -5. The time now is 10:27 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