Desde less, escriba y sluego escriba el nombre del archivo en el que desea guardar, luego Enter.
Desde la manpágina, debajo de COMMANDS:
s filename
Save the input to a file. This only works if the input is a pipe, not an ordinary file.
manLa página también indica que, dependiendo de su instalación particular, el scomando podría no estar disponible. En ese caso, puede ir a la línea 1 con:
g or < or ESC-<
Go to line N in the file, default 1 (beginning of file).
y canalizar todo el contenido catcon:
| <m> shell-command
<m> represents any mark letter. Pipes a section of the input file to the
given shell command. The section of the file to be piped is between the
first line on the current screen and the position marked by the letter.
<m> may also be ^ or $ to indicate beginning or end of file respectively.
entonces:
g|$cat > filename
o:
<|$cat > filename
es decir, tipo go <( g o menos-que ) | $( tubo entonces dólar ) a continuación, cat > filenamey Enter.
Esto debería funcionar si la entrada es una tubería o un archivo ordinario.
lessuna vez que ya he abiertoless.No usa menos, usa tee y luego pipe tee para menos.
./program | tee program.out | lessfuente
teeuna vez quelessya se había abierto.