'

My Fav bash less commands.

September 13th, 2013 by Andrea Matesi 1590 Views

Just kidding...

Everybody knows less (it doesn't mean people are becoming more stupid!), if you don't, you don't know what you're missing.

Let me show you less:

Knowing less means also knowing less is better than more :D

less I-know-less.log

It's especially useful when used with the log files from /var/log.

Once you know less, you should also know less commands!

less commands to do more than more!

This is a list of my favourite less commands.

I evidenced the most useful one (in my experience).

command description
My favourite less commands.
<spacebar> Scroll forward 1 page.
CTRL+B Scroll backward 1 page.
/txt2srch
Finds the "txt2srch" string inside your open file.
n
Next occurrence of searched string (ie.with a /).
N
Search backwards.
g
Go to beginning of open file.
G
Go to EOF.
v Opens current file with vi (but then you'll have to quit twice...).
:n
Opens next file (ie. less file1 file2).
:p
Opens previous file.
q
Quit less.

 

 

 

 

 

 

 

 

 

 

 

SRC:
http://claymore.rfmh.org/public/computer_resources/unix_commands.html

 

 

Posted in LINUX, System Administration | Comments Off on My Fav bash less commands.

Comments are closed.