Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
Tweeted twitter.com/#!/StackUnix/status/146958598143090688
Source Link
haelix
  • 592
  • 1
  • 5
  • 12

Follow a pipe using less?

Can less follow (by pressing F) a piped input (similarly to a file)? For a file that is being written to, the command

less <file> 

will follow the file when pressing F.

But if I have a command that pipes output directly into less, like this

command | less 

pressing F will do nothing.

So it looks like pipes cannot be followed like files can? Or maybe it has to do with command also writing to STDERR? The effect I'm trying to achieve is always see the latest output of the command: just like keeping PageDown pressed!

A related remark holds for G (go to end): when piping directly to less, it won't work.