English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Linux ex command

Linux Command大全

The Linux ex command is used to start the vim text editor in Ex mode.

The execution effect of ex is like vi -E: You can refer to the vi command for syntax and parameters. For example, to return from Ex mode to normal mode, enter ":vi" or ":visual" command in vim.

Syntax

ex [options][arguments]

Parameter Description:

  • +Number: Start displaying from the specified line number in the file

  • -b: Edit files in binary mode

  • -c command: Execute the specified command after editing the first file

  • -d: Show the difference part when editing multiple files

  • -m: Do not allow file modification

  • -n: Do not use the cache

  • -oN: where N is a number

  • -r: List the cache and display recovery information

  • -R: Open the file in read-only mode

  • -s: Do not display any error information

  • -V: Display the detailed execution process of the command

  • --help: Display help information

  • --version: Display version information

Online Examples

After entering the filename in the ex command and pressing Enter, you can enter the ex editing mode. For example, to edit the testfile file, the command format is as follows:

ex testfile

The output information is as follows:

"testfile" 5L, 95C

"testfile" represents the filename,5L represents5 Line,95 Means the number of bytes

Enter ex mode. Enter "visual" to return to normal mode

Its operation is the same as in vim. If you enter "visual" after ":" and press Enter, you will enter the full-screen interface of vi command mode; if you enter "q", you will exit the editor.

Linux Command大全