Bash output command too large, can't read it!

18,409

Solution 1

People usually use a pager like less to read such a long output:

sshfs -h | less

On less type H to show help. Q to quit.

Note that you might occasionally need 2>&1 to see also additional output from stderr. For sshfs -h it has such an output so you'd better do that like this:

sshfs -h 2>&1 | less

Besides using a pager, on Linux text console you can scroll back/forward the screen without a scroll bar by typing Shift+PgUp or Shift+PgDn.

Solution 2

Commands like these may help

man sshfs
sshfs -h 2>&1 | more   # or "less", if possible
Share:
18,409

Related videos on Youtube

Mauk
Author by

Mauk

Updated on September 18, 2022

Comments

  • Mauk
    Mauk over 1 year

    I'm having some troubles on Ubuntu 14.04 initialization, it fails to mount an SSH folder and gives me the option of a manual recovery by pressing M, displaying a command-line logged at root user for debugging the problem.

    My troubles start when I try to read the sshfs help file and it is bigger than the screen, therefore impossible to read the cut-out part.

    I managed to solve this by doing sshfs -h >> read; nano read but I'm wondering if there is a easiest or more elegant/right way of doing this job.

    PS: I'm not at the Ubuntu terminal emulator, so it's impossible to adjust the "scrolling" tab, since it doesn't exists.

  • Terrance
    Terrance over 8 years
    +1 I remember being taught that less is more. That is how I remember. Plus, you can scroll back through less where you cannot with more.