Solved

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

Posted on 2011-03-22
5
672 Views
Last Modified: 2013-12-06
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?
0
Comment
Question by:gram77
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 400 total points
ID: 35188697
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.

wmp

0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35188712
Hi!

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.

Ref: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Regards, Tobias
0
 
LVL 4

Expert Comment

by:m_walker
ID: 35188735
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).

0
 
LVL 31

Assisted Solution

by:farzanj
farzanj earned 100 total points
ID: 35188753
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.

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

SCP:  Download a free WINSCP and transfer the file to your local machine.
0
 
LVL 18

Expert Comment

by:TobiasHolm
ID: 35188767
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!

Ref: http://winvi.de/en/

Regards, Tobias
0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question