less -jは私には機能しません

less -jは私には機能しません

less -jnここで、nは移動する行番号ですが、私には機能しません。それだけでは動作しません。 Ubuntu 11.04でより少ないバージョン436を実行しています。私も試してみless --jump-target=200ましたLESS='-j200' less filename

ベストアンサー1

-j検索の仕組みを設定します(画面上の検索結果を含む行が配置される場所)。探していると思います。

less +200 filename           # jump to line 200 (the first line is 1)

NUM行に移動スイッチは、+NUMUNIXテキストビューア(で始まるmore)とエディタで非常に一般的です。 Lessは、+commandファイルを開いた後に自動的にコマンドを実行できるより一般的なインスタンスです。その他の一般的な例:

less +200P filename          # jump to the line containing byte 200
less +G filename             # jump to the end of the file (G command)
less +/hello filename        # jump to the first occurrence of hello

おすすめ記事