Next / Previous / Contents / TCC Help System / NM Tech homepage

2. Starting vi

To edit one or more files:

vi f1 f2

where f1 is the name of the first or only file, f2 is the name of the second file, and so on.

Note

Most vi versions will not recognize a change in permissions, so if you start editing a file to which you didn't have write permission, you won't be able to save changes (except to another file) even if you are root, or change the permissions while still editing it in vi. Also, it's best to give vi a file name upon invocation, because if you don't you will have to tell it the file name every time you want to save it.