Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-03-22
5
Medium Priority
?
674 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 1600 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 400 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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.
Suggested Courses

670 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