Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

   

 

  Oracle Tips by Burleson

Cutting, Copying, and Pasting text

Any of the text deleting commands discussed earlier work similarly to the cut feature of Windows in that they place the deleted text in a buffer area for potential retrieval (pasting) later. In Windows the buffer is referred to as the clipboard.

In vi there is a default (unnamed) buffer and 26 specifically referenced buffers each identified by one of the letters of the alphabet (a, b, c, d, etc.). In order to referenced one of the named buffers, you precede the buffer identifier character with a quote. So, a refers to buffer a, b refers to buffer b, and so on.

When you use one of the delete commands, the text is cut from the document and placed in the default buffer. To retrieve text from the default buffer you can use the P (upper case) command to paste the default buffer before the current cursor line or p (lower case) command to paste the contents of the buffer after the current line. Therefore, a 5dd command followed by a cursor movement and a P command would cut 5 lines of text and place them before the line where the cursor was moved.

Instead of cutting (deleting) text, you can also copy text from a file using the yy (yank) command. The yank command gives you the option of copying text to one of the specific named buffers. Whereas yy copies the current line to the default (unnamed) buffer, cyy would copy the current line to the buffer named c.

Be forewarned that issuing multiple yank commands to the same buffer (default of specifically named) without intervening paste commands will result in buffer overwrites. In other words, you cannot yank line 5 to buffer a, then yank line 7 to buffer a and expect to be able to paste both lines 5 and 7 somewhere.

When you yank line 5, it is placed in buffer a as requested, but when you follow with a command to yank line 7 to buffer a, line 7 will overwrite (clobber) line 5 which is sitting in the buffer. This is one of the reasons for providing multiple named buffers to use for multiple successive yanks.

Copy and paste commands

Command
Action

yy
Copy (yank) the current line of text into the default (unnamed) buffer

byy
Copy (yank) the current line of text into the buffer named b

5yy
Copy 5 lines of text to the default buffer

p
Paste the default buffer after the current cursor line

P
Paste the default buffer before the current cursor line

bP
Paste the contents of named buffer b before the current cursor line
 

The above book excerpt is from:

Easy Linux Commands
Working Examples of Linux Command Syntax

ISBN: 0-9759135-0-6   

Terry Clark 

http://www.rampant-books.com/book_2005_1_linux_commands.htm 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster
 
 
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  

and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2017

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.

Remote Emergency Support provided by Conversational