Solved

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

Posted on 2011-03-22
5
664 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
5 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 400 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now