LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-02-2012, 04:35 AM   #1
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Rep: Reputation: 1
Question Deleted /var/log directory. .!!!


Hi,

curently using SUSE Linux Enterprise Server 10 (i586)

by mistake i deleted all the files inside /var/log/ directory

actually file size was around 6GB so wanted to delete unwanted files, without my knowledge i deleted by giving a command "rm -rf *"

Code:
varun:/var/log # rm -rf *
now directory is empty!!!

what will happen next??? will it effect my pc??
how do i get my logs back??? apache is running, no logs of apache too!!!

and as per the below thread
http://www.linuxquestions.org/questi...441/?forumid=4

i did "logrotate -f /etc/logrotate.conf"

but still m not getting any log messages!!!

what could be the issue??
 
Old 03-02-2012, 04:46 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
realistically the data is gone, but it's only logs. Does it matter?? Just create it again with the right permissions and off you go.
 
Old 03-02-2012, 04:47 AM   #3
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
deleted

Last edited by Satyaveer Arya; 03-02-2012 at 04:49 AM.
 
Old 03-02-2012, 04:50 AM   #4
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by acid_kewpie View Post
realistically the data is gone, but it's only logs. Does it matter?? Just create it again with the right permissions and off you go.
I am not worried about the data, but worried about the logs files!
do i have to manually create files again???

assuming apache or system is having a problem/error!!
How can i see logs of it again??

Last edited by varunb; 03-02-2012 at 04:55 AM.
 
Old 03-02-2012, 04:55 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
They're just text files dude, nothing interesting. If apache has a problem it will log it. If the file doesn't exist, it will create it. your /var/log/messages file, and most others, is created by logrotate, just a dumb program shuffling files about.
 
Old 03-02-2012, 04:59 AM   #6
varunb
Member
 
Registered: Mar 2011
Location: Bangalore, INDIA
Distribution: opensuse, fedora
Posts: 135
Blog Entries: 1

Original Poster
Rep: Reputation: 1
Wink

Quote:
Originally Posted by acid_kewpie View Post
They're just text files dude, nothing interesting. If apache has a problem it will log it. If the file doesn't exist, it will create it. your /var/log/messages file, and most others, is created by logrotate, just a dumb program shuffling files about.
Ok. .

so it will auto creates the files!!! That is what i wanted??

anywayz thanks for the reply!!! good day ahead!!!
 
  


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
full content of /var/log directory was deleted cccc Debian 1 04-13-2010 05:04 PM
deleted my /var/log directory TuxLives Linux - Distributions 2 05-07-2007 10:02 PM
postgresql in /var/log deleted teacmalaysia Linux - General 2 06-04-2006 11:04 PM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 05:03 PM
Accidentally Deleted Everything In /var/log Joe Heng Slackware 3 12-23-2004 08:20 PM


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