How can I copy file from Windows to Ubuntu?

LINUX UBUNTU : How to copy line in a file and paste it into a new file?

  • I have a file containing my personal details (.txt). How can I copy ONLY few lines in the file and bring it to a NEW .txt file? KINDLY ASSIST ME, PLEASE AND THANK YOU p/s : Doing all this in terminal

  • Answer:

    simple open txt file that contains the details now select the lines which you want to copy then press ctrl+c or right click on selected text and click on copy now minimize the txt file now open new txt file and press ctrl+v or right click paste

Wanie at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

A few lines on the top? Use the head command. A few lines on the bottom? Use the tail command. This example will copy the first 3 lines on the top from file.txt and paste the output into newfile.txt head -n3 file.txt > newfile.txt

are you connected with SSH or in the GNOME terminal? either way open two terminal screens, vi the target and source files in each separate screen in the source file if using SSH to connection you can highlight and COPY from Source. in the TARGET go to line in which you want to insert, do a ESC "o' Lower case O to open a new line. then "paste the content" of the clipboard from the source. with ESC p OR if you wish to place a specific line, you can also grep for the line in SOURCE and concat it at the end of target. grep "String" source to see if it pulls the string you want. to append the "String" at the end of the target file simply grep "String" source >> Target I do a lot of preprocessing of files between database on a linux box, there are a lot of ways to play it but a simple edit is using vi. get familiar with it and becomes a very good friend. A lot of NOOBs struggle with it, but it isn't as complicated

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.