How Do I Open Multiple Files in Unix?
Contents

How do I open multiple files in Linux?

The answer to my question was you can’t, but you can open two files in one bash window using VIM’s :split command:

  1. Open a file with $ vim file1 , open a second file within VIM using :split file2 command.
  2. Or, use $ vim -o file1 file2 from bash.
  3. Switch between files–toggle active file–in VIM with ctrl – w ctrl – w .

How do I open multiple files in vi?

1 Invoking vi on Multiple Files one. When you first invoke vi, you can name more than one file to edit, and then use ex commands to travel between the files. invokes file1 first. After you have finished editing the first file, the ex command :w writes (saves) file1 and :n calls in the next file (file2).

Chloe Bennett

Chloe Bennett

Culture, Media & Entertainment Columnist

Chloe Bennett explores the intersection of pop culture, streaming entertainment, digital trends, and contemporary lifestyle. Her weekly commentary reaches thousands of culture enthusiasts.

Share this article
Twitter Facebook Pinterest