Latest web development tutorials

Linux ex Commands

Linux command Daquan Linux command Daquan

Linux ex command starts vim text editor in Ex mode.

ex execution effect as vi -E, use the syntax and parameters can refer to the vi command, such as from Ex mode back to Normal mode, enter in vim ": vi" or ": visual" command can.

grammar

ex [选项][参数]

Parameter Description:

    + Number: Displays the file number specified row
  • -b: Use binary mode to edit files
  • -c command: The specified command after you finish editing the first file execution
  • -d: When you edit multiple files, show differences section
  • -m: not allowed to modify the file
  • -n: Do not use the cache
  • -oN: where N is a digital
  • -r: lists the cache and display the recovery information
  • -R: Open the file in read-only mode
  • -s: do not show any error messages
  • -V: Display detailed implementation instructions
  • --help: Display help information
  • --version: display version information

Examples

After the ex command input file name Press the Enter key to enter edit mode ex, such as editing testfile file, the command format is as follows:

ex testfile 

Information output is as follows:

"testfile" 5L, 95C 

"Testfile" indicates the file name, 5L indicates 5 line 95 represents the number of bytes

Enter ex mode. Enter the "visual" back to normal mode

Its operation is the same with vim, at this time if the ":" after input "visual" press the Enter key to enter the vi full-screen command interface; if you enter "q", then exit the editor.

Linux command Daquan Linux command Daquan