Linux/Ubuntu Debian

less 사용법

smores 2017. 11. 30. 23:20

http://www.thegeekstuff.com/2010/02/unix-less-command-10-tips-for-effective-navigation/


VI 의 것들과 거의 유사하다


search navigation


forward search

/pattern - search for a pattern to the forward direction

n - go to the next match

N - go to the previous match 


backward search

?pattern

n - go to the previous (go backward)

N - go to the next (go forward)


CTRL+ F/B/D/U - forward one window / backward one window / forward half window / backward half window


j / k - one line forward / backward

10j / 10k - 10 lines forward / backward


G / g - go to the end / start


q or ZZ - exit


CTRL+G - show the current file name with line, byte, ...


v - if file is opened, edit using the configured editor (Ubuntu default nano)


h - help page


&pattern - display only the matching lines


ma / 'a - mark the position with 'a', go to the marked position 'a'


multiple file paging

$ less file1 file2


or 

$ less file1

:e file2


:n / :p - go to the next / previous file


'Linux > Ubuntu Debian' 카테고리의 다른 글

Ubuntu Mate  (0) 2017.12.01
unzip multiple files  (0) 2017.11.30
리눅스에 PATH 설정  (0) 2017.11.30
Ununtu 17.10  (0) 2017.10.25
my most favorite linux distro/desktop  (0) 2017.07.17