in VI mode i want copy particular specific lines from. log, .txt file

I have files which contain more than 2,00,000 lines in file i. e. abc.log file in that I want to copy line 600 to 750 and 40,000 to 60,000 in VI mode and paste new txt files

1

1 Answer

In normal mode (use Esc if you are currently in insert mode)

:600,750w new_file_name1

and

:40000,60000w new_file_name2
0

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like