Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

delete last N lines from all text files in a folder

user575089Jan 24 2016 — edited Jan 25 2016

I need a small program or a tool or a software which could do this following task :

I have a data folder where there are many text files. I need to delete last N lines from all these text files.

Can anyone please provide a sample java code to do this ?

my  java version "1.8.0_66"

Alternatively ,if there is any software/tool could do the same task, please post the link to the software (if any).

thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 22 2016
Added on Jan 24 2016
12 comments
2,737 views