Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

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 …
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
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
Course of the Month11 days, 21 hours left to enroll

916 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