Vi Commands for Unix

In: Computers and Technology

Submitted By brysfb
Words 1301
Pages 6
vi commands
The following tables contain all the basic vi commands.
Starting vi
|Command |Description |
|vi file |start at line 1 of file |
|vi +n file |start at line n of file |
|vi +$ file |start at last line of file |
|vi +/pattern file |start at pattern in file (do not insert a space between the ``+'' and ``/'' characters. |
|vi -r file |recover file after a system crash |

Saving files and quitting vi
|Command |Description |
|:e file |edit file (save current file with :w first) |
|:w |save (write out) the file being edited |
|:w file |save as file |
|:w! file |save as an existing file |
|:q |quit vi |
|:wq |save the file and quit vi |
|:x |save the file if it has changed and quit vi |
|:q! |quit vi without saving changes |

Moving the cursor
|Keys pressed |Effect |
|h |left one character |
|l or |right one character…...

Similar Documents

Did Britain’s Victory in the Falklands War Owe More to the Superior Training, Élan and Command Structure of the British Armed Forces Vis-À-Vis the Argentinean Conscript Army Than to Britain’s Superior Military Technology?

...Did Britain’s victory in the Falklands War owe more to the superior training, élan and command structure of the British armed forces vis-à-vis the Argentinean conscript army than to Britain’s superior military technology? (2611 WORDS) The Falklands War was a conflict over what seemed an insignificant archipelago of islands in the South Pacific, 500 miles from the coast of Argentina and 8000 miles away from the British mainland. The conflict was the result of 149 years of unsuccessful diplomacy[1], which resulted in an Argentinean “recovery”[2] of what they held as the “Malvinas” islands. This led to the outbreak of the last successful conventional campaign of the twentieth century. After the Argentine surrender on June 14th of 1982, the debate of why and how the British achieved victory became prominent. Some believe that it resulted from better training, a more effective command structure and the thrust with which the British embarked on the campaign. Others judge that the victory was due to Britain’s superior military technology. This essay will explore the extent to which this idea was credible. The comparison between the British and Argentineans will be made. This war, which is described as “two bald men fighting over a comb”[3], will be examined in order to understand the combination of factors that resulted in British victory in the spring of 1982. In order to answer why the Argentineans’ attempt at repossession was unsuccessful, it is significant to......

Words: 3601 - Pages: 15

Unix

...| UNIX Performance Monitoring | My Research Paper | Student: Dwayne Blanchard Instructor: Professor Cliff KrahenbillAdvanced UNIX AdministrationMarch 3, 2012 | | | | | | The topic of my research paper will be on UNIX performance monitoring. The reason for choosing this topic is for personal understanding on how much UNIX performance monitoring differs from the monitoring of Windows based computers. This research paper is not to compare the two systems but to gain an understanding of how UNIX monitors performance. I don’t have any personal experience with working with UNIX systems, but as always eager to gain insight of different operating systems. The first thing I would like to discover is some of the common performance problems encountered caused by software, hardware and the combination of the two, the different terminologies associated with the processes via hardware or software, and finally what different utilities are used for monitoring these problems. We all know that UNIX has been around since the early 1970’s and the developments of performance tools have been around for a long time to enable system administrators in tuning systems for optimal performance. Operating systems performance problems normally involves process management, memory management, and scheduling. The object of performance on UNIX based systems is to determine the amount of time the operating system spends during......

Words: 1293 - Pages: 6

Unix

...The UNIX OS What is UNIX? UNIX is a Main Frame operating system developed by AT&T employees at Bell Labs (1969 – 1971). UNIX originally was named “Unics” (Uniplexed Information & Computing Service). It was renamed “Unix” when it could support multiple users. In 1972 UNIX was rewritten in the C programming language. C was developed for the UNIX OS to write programming for the UNIX OS. C is a low level programming language but not as low level as assembly. So C makes writing programs easier than Assembly and also makes them hardware independent. The entire UNIX OS was rewritten in the C programming language. So this made UNIX portable. You don’t have to rewrite the operating system whenever you wanted to port it to a new type of hardware. In 1975 AT&T, because of a court order centering around an anti-trust case, was forbidden from entering the computer software business. Thus, unable to sell the UNIX OS, they gave it away. If you wrote to them and asked for a copy of UNIX-they would give you a free license and send you all the source code. This made it attractive for government agencies, universities and corporations. They could get this free, and very powerful operating system, to run on their main frames. 1975 was the point when computers were beginning to take off and there are a lot of people at universities learning about computers for the first time, getting access to main frame computers for the first time and they’re using UNIX. So UNIX becomes......

Words: 576 - Pages: 3

Ftp Commands

...Common FTP Commands ? | to request help or information about the FTP commands | ascii | to set the mode of file transfer to ASCII  (this is the default and transmits seven bits per character) | binary | to set the mode of file transfer to binary  (the binary mode transmits all eight bits per byte and thus provides less chance of a transmission error and must be used to transmit files other than ASCII files) | bye | to exit the FTP environment (same as quit) | cd | to change directory on the remote machine | close | to terminate a connection with another computer |   | close brubeck | closes the current FTP connection with brubeck,    but still leaves you within the FTP environment. | delete | to delete (remove) a file in the current remote directory (same as rm in UNIX) | get | to copy one file from the remote machine to the local machine |   | get ABC DEF | copies file ABC in the current remote directory to (or on top of) a file named DEF in your current local directory. |   | get ABC | copies file ABC in the current remote directory to (or on top of) a file with the same name, ABC, in your current local directory. | help | to request a list of all available FTP commands | lcd | to change directory on your local machine (same as UNIX cd) | ls | to list the names of the files in the current remote directory | mkdir | to make a new directory within the current remote directory | mget | to copy multiple files from the remote machine to the......

Words: 402 - Pages: 2

Unix

...Protection Scheme with Unix Adam Macon POS/355 8-10-13 Mr. Groves When considering a protection scheme that will protect up to 5,000 users the best choice would be Unix. Unix is an operating system developed in the 70’s in AT&T Bell Laboratories. The unique thing about Unix is that it is written in C, which gives it the ability to be portable and able to be integrated with other Unix machines. Program written on one Unix machine can be easily adapted to other Unix machines (C is particularly well-integrated with the operating system itself) (David 2013). We will discuss exactly what the protection scheme is with Unix and how 4900 users can be one file. Unix system has the ability to serve many users and these users can be organized in groups. A Unix file can distribute ownership to three different classes of users, which are user, group, and other. User is the directory owner, which is the person who created the file, group is the members of the group, and others are the users who aren’t members of the group and are not the file owner. There are three permissions for User, Group, and Others, which are Read, Write, and Execute. A user with Read permission can look at contents of that particular file, a user with Write permission can change contents in that file, and a user with Execute permission can use that particular file as a Unisex system command. Permissions only an be changed by the chmod command. To be able to achieve having 4,990 users on one file you......

Words: 287 - Pages: 2

Unix

...(ACL) they are on which is a set of rules or guidelines which sets the permission level and access a user will have to network assets. UNIX systems are typically based on the file access control schema, which is designed to assign a User Identification number or User ID, which is unique to the individual user. The same goes for a group of users as well but instead of a single user the users are under the Group ID umbrella, which lists all individual users and designates their permissions within the group. A user can have a different set of access within their single user permission opposed to their group permissions. Files are typically secured within UNIX file permissions and through ACLs. Other types of files such as those with sticky bits, and files that are executable require additional special security measures to be implemented in order for users to access them. Traditional UNIX file permissions are classified by ownership using three classes of users: users, groups and others. The owner of the file can usually has the ability to assign or modify file permissions. The root account can also change a file's ownership. All of the permissions are carried out by command line input by the user who owns the file and they are in charge of giving the group access. Read, write, execute and deny. For example if a UNIX Administrator had 5,000 users and wanted 4,990 to access one file in particular they would need to plan accordingly when they assign......

Words: 630 - Pages: 3

Programming in Unix

...Programming in Unix Introduction to Sociology In today’s society, computers have played a major part of how corporations and individuals conduct business. In a sense, they have made some of the hardest tasks fairly easy by the click of a button or by typing a certain command. Computer programs perform both simple and complex calculations with user seeing the end result. However, computer programs have to be written by computer programmers. To understand how programs work, you must consider how the computer interprets the information entered by the programmer. “A program is a set of instructions that guide the computer in performing its basic and logical arithmetic operations (Afzal, 2008, p. 349).” These programs have to be written in a certain language for the computer to interpret. There are several types of languages used to write programs. Although the programmer types words and numbers to perform these mathematical and logical calculations, the computer sees only 1’s and 0’s. This is called machine language. There is also assembler language. “Instead of a series of zeros and ones, assembler language uses some recognized symbols, called mnemonics (memory aids), to represent instructions (Afzal, 2008, p. 349).” High level language is the language in which the programmer desires to write in such as Pascal, C++, C, and Java to name a few. To translate a high level language to machine language, a compiler or an interpreter must be used. The first......

Words: 1049 - Pages: 5

Unix

... TO UNIX AND SHELL TOOLS 7 9 23 37 51 69 85 Shell Basics Script Basics Working with Files Working with Directories Manipulating File Attributes Processes PART II SHELL PROGRAMMING Hour 7 8 9 10 11 12 13 14 15 16 17 18 Variables Substitution Quoting Flow Control Loops Parameters Input/Output Functions Text Filters Filtering Text Using Regular Expressions Filtering Text with awk Miscellaneous Tools 103 105 117 129 143 159 175 189 211 223 241 259 285 PART III ADVANCED TOPICS Hour 19 20 21 22 23 24 Dealing with Signals Debugging Problem Solving with Functions Problem Solving with Shell Scripts Scripting for Portability Shell Programming FAQs 303 305 317 333 357 381 393 00.72314819 FM 10/24/00 9:55 AM Page iv PART IV APPENDIXES A B C Command Quick Reference Glossary Quiz Answers Index 405 407 423 433 453 00.72314819 FM 10/24/00 9:55 AM Page v Table of Contents INTRODUCTION 1 PART I INTRODUCTION TO UNIX AND SHELL TOOLS 7 9 HOUR 1 SHELL BASICS What Is a Command? ............................................................................................10 Simple Commands............................................................................................11 Complex Commands ........................................................................................11 Compound Commands ....................................................................................12 Command......

Words: 112126 - Pages: 449

Unix

... Carrier Objective: Obtaining a challenging career in the field of Information Technology as a Unix/Linux Systems Administrator to utilize the knowledge that I have gained through past years of experience in various industries such as Telecommunications, Banking, Medical, Insurrance and government establishments . Qualification Summary: 5 Years of Unix experience with overall 10+ years of experience in the field of Information technology. Master's Degree in Micro-Electronics & Diploma in Computer Sciences. Specialize in following: Unix Administration on Sun Solaris and Red Hat Linux environment. VERITAS Volume Manager and Cluster Server experience. Websphere Application Server experience Virtualization Technologies VMware ESXi 5 Large 24x7 mission-critical production environment experience. Unix Administration, maintainance providing support in an enterprise enviroment (Resolved, escalated and dispatched technical issues) Experience with EMC/Openfiler SAN,configured and Managed SAN storage for Vmware Vsphere enviroment . Communication skills in handling diversified activities like Customer Support, in various capacities from front-end field engineer to the present capacity working. Well versed with Incident resolution and Change Management process. Performing Datacenter administration ( HP/SUN Servers including C7000,M4000, M5000, T5220, T5240, V440, V480/V490, V880/V890, E4500, E6500) tasks such: Backups, restore, Tape Management, Installation, Upgradation &......

Words: 1089 - Pages: 5

Unix Commands

...UNIX internet commands have remained mostly the same since the creation of the internet because UNIX is an operating system that can be run on any network server or workstation. From the beginning UNIX was the backbone of the internet.  UNIX is what keeps the internet functioning today.  The commands have remained mostly the same because even though the internet has emerged the commands have remained the same.  UNIX was developed over the past 25 years.  The commands are still the same partly because UNIX has a reputation for scalability and stability.  This helps to keep up with the times of today’s operating system.  I don't believe there was or is a need for change of commands.  The same commands are still accessible as they were over 25 years ago. If we take it a step further looking at today’s atmosphere schools for example don’t receive the same funding as they have in the past. Meaning n educational environment their budgets are limited. With UNIX commands remaining the same there is no need for schools to spend resources they don’t have. I also think that the commands have remained the same because computers were not as advanced before as they are now. Computers now can handle UNIX and others alike along with possible upgrades. Unlike many others UNIX can adapt to technology changes without changing itself. However, the internet hasn’t changed since the beginning of time. Throughout the life span of UNIX new protocols were developed and new applications......

Words: 354 - Pages: 2

Unix

...UNIX operating system and its features UNIX is a certified brand of The Open Group that belongs to a family of computer operating systems. UNIX stands among some initial operating systems which has to be written in a high level programming language that is C. Further Bell labs circulated it in a way that anyone could customize it according to his own wishes. As a result in late 70’s, number of versions of this operating systems were running at several places [Vangie Beal(2015)]. File permissions features of UNIX The most important feature of UNIX Operating system is that it procures a safe and sound method for storing data and information. Each file stored in UNIX has some characteristics and attributes like “owner permissions” in which it specifies that what actions and tasks the owner of the information or file can execute or perform. The second permission is “group permissions” which allows the user who is a part of group can perform different functions on a particular file of the same group but for this one must have to be a part of the group. The third is “other permissions”. It is a permission which determines what type of actions and functions, rest of the users can perform on particular file [Tutorialspoint(2014)]. Security feature of UNIX The security of the systems can be increased by some specific settings which controls the access of different users. This feature includes read, write and execute access options. The read access option allows users to view......

Words: 452 - Pages: 2

Unix/Linux Comparison Matrix

...Unix® and Linux® Comparison Matrix - 5 Marks 1. Name three versions of Unix 1. BSD/OS 2. AIX 3. Solaris 2. Name three versions of Linux 1. Canonical's Ubuntu 2. Novell's openSUSE 3. Red Hat's Fedora 3. Describe 3 major differences between Unix and Linux 1. Cost- Linux is free and Different flavors of UNIX have different cost structures according to vendors. 2. Linux is an example of Open Source software and UNIX is a closed source OS. 3. Text mode interface: Linux- BASH (Bourne Again SHell) is the Linux default shell. It can support multiple command interpreters. UNIX- Originally the Bourne Shell; now it's compatible with many others including BASH, Korn & C. 4. Which of the following is not a UNIX or Linux variant a. SunOS b. RedHat c. DOS d. HP-UX e. Debian 5. Use the command to change directory locations. a. cd b. rm c. mkdir d. cut 6. Use the command to delete a directory. a. delete_dir b. mkdir c. rmdir d. cat 7. Which of the following are text editors? (Choose all that apply.) a. vi b. emacs c. ls d. cat 8. The command creates a directory named winchester in the root directory. a. mkdir /winchester b. mkdir ../Winchester c. mkdir \winchester d. md /Winchester 9. The command allows......

Words: 378 - Pages: 2

Guide to Unix Using Linux

... Guide to UNIX Using Linux FOURTH EDITION Michael Palmer Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States Guide to UNIX Using Linux, Fourth Edition Michael Palmer Acquisitions Editor: Nick Lombardi Publisher, Senior Vice President: Kristen Duerr Senior Editor: Lisa Egan Senior Product Manager: Alyssa Pratt Product Managers: Molly Belmont and Alyssa Pratt Development Editor: Deb Kaufmann Technical Editor: John Bosco Executive Editor: Steve Helba Content Project Manager: Philippa Lehar © 2008 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher. For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at cengage.com/permissions Further permissions questions can be emailed to permissionrequest@cengage.com Editorial Assistant: Claire Jeffers Marketing Manager: Gayathri......

Words: 154033 - Pages: 617

Unix

... Guide to UNIX Using Linux FOURTH EDITION Michael Palmer Australia • Brazil • Japan • Korea • Mexico • Singapore • Spain • United Kingdom • United States Guide to UNIX Using Linux, Fourth Edition Michael Palmer Acquisitions Editor: Nick Lombardi Publisher, Senior Vice President: Kristen Duerr Senior Editor: Lisa Egan Senior Product Manager: Alyssa Pratt Product Managers: Molly Belmont and Alyssa Pratt Development Editor: Deb Kaufmann Technical Editor: John Bosco Executive Editor: Steve Helba Content Project Manager: Philippa Lehar © 2008 Course Technology, Cengage Learning ALL RIGHTS RESERVED. No part of this work covered by the copyright herein may be reproduced, transmitted, stored or used in any form or by any means graphic, electronic, or mechanical, including but not limited to photocopying, recording, scanning, digitizing, taping, Web distribution, information networks, or information storage and retrieval systems, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without the prior written permission of the publisher. For product information and technology assistance, contact us at Cengage Learning Customer & Sales Support, 1-800-354-9706 For permission to use material from this text or product, submit all requests online at cengage.com/permissions Further permissions questions can be emailed to permissionrequest@cengage.com Editorial Assistant: Claire Jeffers Marketing Manager: Gayathri......

Words: 154033 - Pages: 617

Unix

...There are several editors used in UNIX at present time, NEdit, Emacs, VI, and Pico to name a few. Editors are mainly used to replace the default editors in UNIX. Some people have found the default editor to be complicated and unfriendly to operate. I have chosen Emacs and Vi to discuss. Emacs was derived from a version of Multics which saw its inception August 15, 1979. The original creator was Richard Stallman, the software is a video-oriented text preparation and editing system it ran on Honeywell’s Multics system it was widely accepted at MIT and had a large user community. This acceptance led to the development of protocols for the ARPANET (Advanced Research Projects Agency Network) which is now known more commonly as the Internet. It was designed for the use of video-oriented software in a device independent fashion. ( Greenberg,1996) Emacs was later rewritten on a C platform by James Goslin in 1982. Which he then sold to Unipress and it was renamed Unipress Emacs. One of the major advantages of using Emacs would be the speed of the software. It has the ability to open large files edit them and save in the time it takes to load some programs in windows. The other editor I spoke of earlier would be Vi. The Vi editor was created in 1976 by Bill Joy at the University of California at Berkeley. Bill Joy later worked at Sun Microsystems as the Chief Scientist. Vi is not a GUI (graphic user interface) mode text editor, although it still remains popular. It holds the......

Words: 368 - Pages: 2