LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Deleted /var/log directory. .!!! (https://www.linuxquestions.org/questions/linux-newbie-8/deleted-var-log-directory-932302/)

varunb 03-02-2012 03:35 AM

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??

acid_kewpie 03-02-2012 03:46 AM

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.

Satyaveer Arya 03-02-2012 03:47 AM

deleted

varunb 03-02-2012 03:50 AM

Quote:

Originally Posted by acid_kewpie (Post 4616675)
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??

acid_kewpie 03-02-2012 03:55 AM

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.

varunb 03-02-2012 03:59 AM

Quote:

Originally Posted by acid_kewpie (Post 4616679)
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!!! :)


All times are GMT -5. The time now is 10:05 AM.