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 03-06-2016, 10:19 AM   #1
Princo
LQ Newbie
 
Registered: Mar 2016
Posts: 3

Rep: Reputation: Disabled
Log file empty?


Hi to all, one newbie question.

I delete all log dile in /var/log/rm * then pres y for all files, then i delte all in /var/log/httpd/rm * .

But now the directory still empty, where is new logs?

Thanks
 
Old 03-06-2016, 10:43 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Welcome to LQ!

You probably need to restart the httpd. Next time you can empty the log by using echo command to send a line into log you want to empty.
 
1 members found this post helpful.
Old 03-06-2016, 11:22 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
yes, you need to restart httpd (that is for /var/log/httpd) and I think you need to reboot your PC for /var/log (or at least syslog daemon should be restarted).
In general it is not a good idea, because the log files are opened and continuously in use. rm * will not remove them just remove the directory entry, but those files will be still in use.
 
1 members found this post helpful.
Old 03-06-2016, 01:17 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Good point pan64, of course the file is still open. BTW, I do not think syslog needs to be restarted, if I recall correctly logrotate does not do it.

Anyhow, instead of emptying log files configure your logrotate to your liking.
 
1 members found this post helpful.
Old 03-06-2016, 01:37 PM   #5
Princo
LQ Newbie
 
Registered: Mar 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
working, thanks guys.

And if want to reboot our server, just using command reboot?
Attached Thumbnails
Click image for larger version

Name:	working.jpg
Views:	10
Size:	101.8 KB
ID:	21072  
 
Old 03-06-2016, 01:45 PM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
yes, more or less that works. If you are logged in on GUI there will be also a menu to poweroff/restart
 
Old 03-06-2016, 01:52 PM   #7
Princo
LQ Newbie
 
Registered: Mar 2016
Posts: 3

Original Poster
Rep: Reputation: Disabled
I use putty to send only commands.
 
Old 03-07-2016, 12:48 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,692

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
in that case yes, reboot is the command you need.
 
  


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
/var/log/boot.log is Empty in RHEL 5.10 (Tikanga) sk2code Red Hat 5 05-01-2014 12:53 PM
[SOLVED] /var/log/boot.log is empty in RHEL5.5. How to enable the boot log? rajivdp Linux - Newbie 1 08-12-2010 08:11 AM
the boot.log file is empty deco5003 Linux - Server 3 03-01-2010 10:52 AM
[SOLVED] Empty /var/log/boot.log saifkhan123 Linux - General 3 02-22-2010 02:48 AM
Evidence for being cracked? Empty log file mijenks Linux - Security 10 04-29-2004 12:16 PM

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

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