显示行号
:set nu
取消显示行号
:set nu!
例如:
vi error.log
2019-01-04T11:10:34.238599+08:00 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2019-01-04T11:10:34.246165+08:00 0 [Warning] InnoDB: Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
2019-01-04T11:10:34.246191+08:00 0 [Warning] InnoDB: Using innodb_file_format_max is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000
2019-01-04T11:11:40.243858+08:00 0 [Warning] InnoDB: New log files created, LSN=48433
2019-01-04T11:11:40.351304+08:00 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2019-01-04T11:11:40.414609+08:00 0 [Warning] unknown variable 'loose_rpl_semi_master_wait_point=after_sync'
:set nu