in Operating System recategorized by
1,613 views
4 votes
4 votes

The unix command: $ vi file1 file2

  1. Edits file1 and stores the contents of file1 in file2
  2. Both files i.e., file1 and file2 can be edited using 'ex' command to travel between the files
  3. Both files can be edited using 'mv' command to move between the files
  4. Edits file1 first, saves it and then edits file2
in Operating System recategorized by
1.6k views

1 Answer

2 votes
2 votes

ans is B 

 

You can edit more than one file at a time with vi.

  From The Unix Shell Prompt

  vi file1 file2   vi two (or more) files at the same time
  
  From Command Mode

  :n               Move to file2 from file1
  
  :rew             Rewind back to file1
  
  :e!              Restore original file1 file2 (start all over)
  
  ZZ               Save and quit file. (Must be done for each file.) 

Answer:

Related questions