In vi we can easily do this.
suppose if you want to copy entire file content to some other file then try this
open your original file then in the command line write this
here your entire file content will be copied to
suppose if you want to copy only part of the file then try this
first enable line numbering using this command
After that if you want to copy from line number 10 to 23 then write this command in the
This will copy the content from line number 10 to 23 to