How to delete content of a log file from linux terminal?

How to delete content of a log file from linux terminal?

Hi,

My production server is on the linux machine. I am trying to debug and find the slow running queries. But first I want to delete the content of the /var/log/slow-queries.log file.

Can anyone tell me how to do this?

Thanks

View Answers

April 8, 2014 at 8:11 PM

Hi,

Its easy to do this. You can use the following command to delete the content of the mysql log file:

cat /dev/null > /var/log/slow-queries.log

Thanks









Related Tutorials/Questions & Answers:
How to delete content of a log file from linux terminal?
how to delete a jar file from mobile by using j2me program.
Advertisements
How to delete a character from a file in java - Java Beginners
Delete a file from FTP Server
How to delete file in Java code?
How to delete data from MySQL?
How to delete file in java ?
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
how to delete a jar from mobile
How to delete .xlsx file in java?
How to read a log file from server location and send a mail when exception occurs.
how to check the size of a tar file in linux
Storing content from file path to an array
How to extract a zip file to a folder in Linux?
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application
how to delete a jar from mobile in j2me application

Ads