Copy huge data into vi editor


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Copy huge data into vi editor
# 8  
Old 08-11-2011
Are you copying the data using Windows and PuTTY, and not from a file on the server itself? You'll have to describe your situation a bit more in detail, since not everyone uses the same environment and practices as you do. Otherwise, you'll get a lot more of well-meant advises that won't work for you.
# 9  
Old 08-11-2011
Quote:
Originally Posted by alok.behria
still notout of the woods.
I followed.

1. vi tst.sql
2. i was already at 1st line. did the escape and 100= to align 100 lines then did the paste. it turns out to be..

Code:
set linesize 200
break on report

                                                                                                      compute sum of free_mb on report

                                                                                                      compute sum of act_size on report

                                                                                                      compute sum of used_mb on report

                                                                                                      col %used format 999.99

                                                                                                      col %Free format 999.99

                                                                                                      col act_size format 99,99,999.99

                                                                                                      col free_mb format 99,99,999.99

                                                                                                      col used_mb format 99,99,999.99

                                                                                                      col file_name for a60

                                                                                                      col largest_extent_MB format 99,99,999.99

                                                                                                      col tablespace for a25


Hi,

first u have to paste the file content, after that only u follow the steps which i have given
# 10  
Old 08-11-2011
Yes, you are right, I am copying the data from editplus a window text editor back to vi.
I also did the same work in the past, but from quite a few days, it's just not working for some reason. thanks anyway!
# 11  
Old 08-11-2011
Ok, follow these steps:
  • Start vi
  • Enter this text exactly as it is, without going to insert mode ('i') first::set paste
  • Enter insert mode (press 'i'). You may see the text "INSERT (paste)" at the bottom of the screen
  • Paste your text
  • Save the file as usual

The paste option tells vi not to alter any input, but take it as it is given, including any indentations.
# 12  
Old 08-12-2011
Hi,

I've taken the following steps, still the results remains unchanged. May be, some big guns has something to offer.

1. I did vi test.sql
2. typed :set paste, without going into 'insert mode'
3. save the file as usual with :wq!.
4 aftre reopened it and found below text still lauging at me.

Code:
pagesize 100
set linesize 200
break on report

                                                                                                      compute sum of free_mb on report                       
                                                                                                      compute sum of act_size on report                      
                                                                                                      compute sum of used_mb on report                       
                                                                                                      col %used format 999.99                                
                                                                                                      col %Free format 999.99                                
                                                                                                      col act_size format 99,99,999.99                       
                                                                                                      col free_mb format 99,99,999.99                        
                                                                                                      col used_mb format 99,99,999.99                        
                                                                                                      col file_name for a60                                  
                                                                                                      col largest_extent_MB format 99,99,999.99              
                                                                                                      col tablespace for a25                                 
                                                                                                                                                             
                                                                                                                                                                select SUBSTR(a.tablespace_name,1,20) "TABLESPACE",act_size,free_mb,
                                                                                                                                                                free_mb*100/act_size "%FREE",
                                                                                                                                                                act_size-free_mb used_MB,((act_size-free_mb)*100)/act_size "%USED",largest_extent_MB
                                                                                                                                                                from (SELECT TABLESPACE_NAME,SUM(BYTES)/1024/1024 FREE_MB,
                                                                                                                                                                max(bytes)/1024/1024 largest_extent_MB
                                                                                                                                                                FROM DBA_FREE_SPACE group by tablespace_name) a,
                                                                                                                                                                (SELECT TABLESPACE_NAME,SUM(BYTES)/1024/1024 ACT_SIZE FROM
                                                                                                                                                                DBA_DATA_FILES group by tablespace_name) b
                                                                                                                                                                where a.tablespace_name(+)=b.tablespace_name
                                                                                                                                                                --order by 1
                                                                                                                                                                and a.tablespace_name in
                                                                                                                                                                ('FDR')
                                                                                                                                                                order by 1


Last edited by pludi; 08-12-2011 at 06:00 AM..
# 13  
Old 08-12-2011
It doesn't work on existing files. The paste option only affects new entered text.
# 14  
Old 08-12-2011
I've entered the new texts.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copy/paste in vi editor

Hello guys, I am trying to copy a line in vi editor and paste it with below commands but paste command is not working and instead of paste action prints the p character!! I should also mention that the server is Solaris... 1) crontab -e 2) j to move down 3) yy to copy the line 4) o to... (4 Replies)
Discussion started by: Newman
4 Replies

2. Solaris

The Fastest for copy huge data

Dear Experts, I would like to know what's the best method for copy data around 3 mio (spread in a hundred folders, size each file around 1kb) between 2 servers? I already tried using Rsync and tar command. But using these command is too long. Please advice. Thanks Edy (11 Replies)
Discussion started by: edydsuranta
11 Replies

3. Shell Programming and Scripting

Aggregation of huge data

Hi Friends, I have a file with sample amount data as follows: -89990.3456 8788798.990000128 55109787.20 -12455558989.90876 I need to exclude the '-' symbol in order to treat all values as an absolute one and then I need to sum up.The record count is around 1 million. How... (8 Replies)
Discussion started by: Ravichander
8 Replies

4. Shell Programming and Scripting

Copy from vi Editor ( unix ) to windows

How to copy the complete content from a file in vi Editor to windows ( notepad ). I can use " select " and paste it to windows but this is restricted to current page. Not allowing me to scroll down or up when selecting the content.:confused: (1 Reply)
Discussion started by: frintocf
1 Replies

5. AIX

Copy huge files system

Dear Guy’s By using dd command or any strong command, I’d like to copy huge data from file system to another file system Sours File system: /sfsapp File system has 250 GB of data Target File system: /tgtapp I’d like to copy all these files and directories from /sfsapp to /tgtapp as... (28 Replies)
Discussion started by: Mr.AIX
28 Replies

6. UNIX for Dummies Questions & Answers

Copy/Paste in Vi editor

Dear All, I have a file containing 12 lines. First 3 lines have 9 values and the remaining 9 lines with no values. I was trying to copy and paste these 9 values of the first 3 lines into last 9 lines simultaneously as A=1.491331, B=1.539000 ..... but I don't know how to cope with this... (9 Replies)
Discussion started by: sullah
9 Replies

7. Shell Programming and Scripting

Vi editor, copy one column?

This is an vi editor question. I do not know is this a right place to ask this question or not? I have a file with the following contents, 10 11 20 21 30 31 I want to copy first column that is 10,20,30 after second column, so that output will look like the following, 10 11 10 20 21 20... (3 Replies)
Discussion started by: MeetP
3 Replies

8. Shell Programming and Scripting

Split a huge data into few different files?!

Input file data contents: >seq_1 MSNQSPPQSQRPGHSHSHSHSHAGLASSTSSHSNPSANASYNLNGPRTGGDQRYRASVDA >seq_2 AGAAGRGWGRDVTAAASPNPRNGGGRPASDLLSVGNAGGQASFASPETIDRWFEDLQHYE >seq_3 ATLEEMAAASLDANFKEELSAIEQWFRVLSEAERTAALYSLLQSSTQVQMRFFVTVLQQM ARADPITALLSPANPGQASMEAQMDAKLAAMGLKSPASPAVRQYARQSLSGDTYLSPHSA... (7 Replies)
Discussion started by: patrick87
7 Replies

9. UNIX for Dummies Questions & Answers

copy and paste certain many lines of huge file in linux

Dear All, I am working with windoes OS but remote a linux machine. I wonder the way to copy an paste some part of a huge file in linux machine. the contain of file like as follow: ... dump annealling all custom 10 anneal_*.dat id type x y z q timestep 0.02 run 200000 Memory... (2 Replies)
Discussion started by: ariesto
2 Replies

10. Shell Programming and Scripting

How to extract data from a huge file?

Hi, I have a huge file of bibliographic records in some standard format.I need a script to do some repeatable task as follows: 1. Needs to create folders as the strings starts with "item_*" from the input file 2. Create a file "contents" in each folders having "license.txt(tab... (5 Replies)
Discussion started by: srsahu75
5 Replies
Login or Register to Ask a Question