selecting the entire file at once in vi in unix/linux.

I have a large file in unix that is generated and i open it in vi.

I need a simillar functionality like ctrl+A in windows that select entire file in one go and i am able to paste the entire file in notepad.

How do i do this in unix/linux?
Who is Participating?
woolmilkporcConnect With a Mentor Commented:
Which terminal software do you use?

With PuTTY the requested functionality can be obtained via "Copy All to Clipboard" from the pull-down menu at the upper left.

vi itself doesn't know anything about a Clipboard or even Notepad.



Use PuTTY to connect to your *nix server, show the file with the command 'cat filename.txt', then select "Copy All to Clipboard" in PuTTY window-menu.

Or use PSFTP to connect to the *nix server and copy the file to your Windows machine.


Regards, Tobias
I like winscp for the file copy, it uses ssh.  Due to the end of line markers notepad may not like it much so a better editor can help (I like crimson editor).

farzanjConnect With a Mentor Commented:
Are you using PuTTy?

If the file is less than or equal to one full screen, then you can right click on the title bar --> "copy all to clip board" and the paste it to notepad.

If it is a long file, you would be better off if you would do either ftp, scp or email to yourself.

cat filename | mail -s"My file" email@address
echo "my file" | mutt -a /path/filename -s"File" email@address

SCP:  Download a free WINSCP and transfer the file to your local machine.
I use WinVI as a text editor in Windows. Only a single EXE and can handle large files, *nix end-of-line, hex data and more. And it's freeware without any nags!


Regards, Tobias
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.