Sie sind auf Seite 1von 2

HP Customer Education vi Quick Reference Card

Opening Files
$ vi $ vi filename [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] :wq! :w! :q! :w newfile h l k j b w ^ $ Opening an empty document Opening a new or existing file Save changes and quit Save without quitting Quit without saving Save as a different file name Go Go Go Go Go Go Go Go left one character right one character up one line down one line back one word forward one word to the beginning of the line to the end of the line

Modes
Input Mode [O] [o] [I] [i] [A] [a] [esc]

Saving and Closing

Command Mode [R] [r] [esc] Replace Mode

[:]
[esc]

ex Mode

Navigation

Inserting & Appending


[esc] [esc] [esc] [esc] [esc] [esc] o O i I a A Open a new line below the cursor Open a new line above the cursor Insert to the left of the cursor Insert at the beginning of the line Append to the right of the cursor Append at the end of the line

Cutting, Copying, & Pasting


[esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc]
[esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc] [esc]

[esc] 1G [esc] 10G [esc] G [control] b [control] f

Go to line 1 Go to line 10 Go to end of file Go back one page Go forward one page

Searching & Replacing


[esc] /oldtext Search down for a string [esc] ?oldtext Search up from EOF for a string [esc] cw Change the current word [esc] n Search again, in same direction [esc] N Search again, in reverse direction [esc] . Repeat previous replace operation [esc]:1,$s/oldtext/newtext/g Globally replace oldtext with newtext :set nu :!cmd :r !cmd :r file Enable line numbering Execute a shell command Read cmd output into the document Read another file into the document

x dd dw db d$ d^ dG p P u U
R ~ rc cc cw cb c$ c^ cG

[esc] [esc] [esc] [esc] [esc] [esc]

yy yw yb y$ y^ yG

Delete current character Delete or copy current line Delete or copy to word Delete or copy to beginning of word Delete or copy to end of line Delete or copy to beginning of line Delete or copy to end of file Paste buffer contents after the cursor Paste buffer contents before the cursor Undo last change Undo all changes made in current line

Replacing Text
Enter replace mode to replace text Change case of current character Replace current character with c Replace the entire current line Replace current word Replace back to beginning of current word Replace to end of line Replace to beginning of line Replace to end of file

Miscellaneous
[esc] [esc] [esc] [esc]

Note: Most vi commands can be preceded by a number. eg: 10dd deletes 10 lines

Visit www.hp.com/education or call 1-800-HPCLASS/1-800-472-5277 to learn more about HP Customer Education


2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. 06/30/2011

HP Customer Education HP-UX Course Offerings

Step 1: HP-UX Core and Transition Courses


Course# 51434S H3064S H3065S H5875S U5523S HK711S Course Name UNIX Fundamentals HP-UX System and Network Administration I HP-UX System and Network Administration II HP-UX for Experienced UNIX Administrators HP-UX 11i v2 for Experienced HP-UX 11i v1 System Administrators HP-UX 11i v3 for Experienced HP-UX 11i Administrators Duration 5 days 5 days 5 days 5 days 4 days 3 days

Step 2: Hardware and Partitioning Training


Course# HC590S HK713S HB506S U5075S HK758S Course Name HP Integrity BladeSystem Administration for HP-UX HP Integrity Superdome 2, nPar, and vPar Administration HP Integrity Virtual Machines HP-UX Partition Management: nPars, vPars, & Integrity Virtual Machines HP BladeSystem Virtual Connect Duration 3 days 3 days 2 days 4 days 3 days

Step 3: High Availability, Security, Performance, and Virtualization Management Training


Course# H6285S HB505S H6487S U8601S HK750S H3541S H1978S H4262S H4264S H4322S H4311S HK712S HF869S U5447S Course Name HP-UX Logical Volume Manager HP-UX VERITAS Volume Manager HP Serviceguard I HP Serviceguard II: Disaster Tolerance, Continental Clusters, CFS, & Oracle RAC HP Serviceguard New Features Workshop HP-UX Security Ignite-UX HP-UX Performance and Tuning HP-UX Troubleshooting POSIX Shell Programming Perl Programming HP-UX Systems Insight Manager HP-UX Virtualization Tools Boot Camp HP-UX Resource Management: PRM & WLM Duration 4 days 4 days 5 days 3 days 2 days 5 days 4 days 5 days 5 days 5 days 5 days 4 days 5 days 3 days

Visit www.hp.com/education or call 1-800-HPCLASS/1-800-472-5277 to learn more about HP Customer Education


2011 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

Das könnte Ihnen auch gefallen