Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In terminal a command has a too long output. But when I scroll back I see it is truncated and only the last part is shown. In Gnome-Terminal and Konsole I have this problem. In xterm there's not such problem but I cannot copy the output in xterm.

How can I get the complete output?

share|improve this question

5 Answers 5

up vote 3 down vote accepted

I know in the xfce4-terminal there is a option to increase the number of lines shown:

enter image description here

For ubuntu Terminal enter image description here

Aside from that there is what @Zelda64fan said.

share|improve this answer
    
+1 Pipe and tee are not optimal as dont work on few cases like take in a HROOT 3NVIORTNM3NT –  22lk94k943 only Jun 1 '13 at 5:35

Use xclip

cat long.output | xclip -sel clip

If not installed you can do

sudo apt-get install xclip
share|improve this answer

If you don't need the entire output, you could pipe it through less: command | less. This would also save the bother of having to delete the file once you've reviewed the output.

share|improve this answer
    
less output is pretty hard to copy. –  Sparhawk Mar 11 at 6:41

In xterm, autocopy on select should be the default. Try triple-clicking then use a middle mouse button (or emulated third button) to paste.

The same should work with other terminals, but you need to manually copy and paste.

There a many, many ways to do this. I like using script in some cases. Type 'script' from a command line to start it before you launch a command from the command line, then hit Ctrl-D to stop. If you don't specify a capture filename, 'typescript' is the default. Everything printed to the screen should be captured in the file.

share|improve this answer

You could send the output to a file: command > file.txt (where command is the command you want to run and file.txt is the file you want to save it to) and then view it with gedit file.txt.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.