Quote:
Originally Posted by ZAMO
Hi Guys,
I am working on remotely using putty to my server. I have a file which has
1866778 lines of text. From that i need to copy from 1191715 to 1195161 and paste it in the local computer's textpad.
How can i do it? Please let me know.
Q2. How can i copy the entire text of a file with 1866778 lines (ex:logs) in a remote server to my local computer, where am working on putty?
Thanks in Advance.
|
Open your favorite editor, which is definitely VIM
Set the line numbers on by typing
:se nu
Go to the correct line by typing
:1191715
Press V for using visual mode. Now you can move your cursor until the line you want.
Then press Y to copy the lines.
Open the target file by typing
:sv targetfile
and press P in it.
Now save and exit by typing
:wq
You can copy the file by using scp.
scp user@remote-host:/path/to/file /local/destination
DONE