I have a very large error log file( around 200 MB),in a remote server
I want to delete some last 125,000 lines from it, using command prompt
How can i do this
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
will get you all but the last 125000 lines from a file named
logfile. If there are less than 125,000 lines you will get nothing.Perhaps you should be looking into
logrotateinstead.