Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After running a command that spits out a lot of output in screen. I drop to Copy mode and try to find where the command start. This becomes very very challenging when there are lots of lots of similar text to sift through. Is there a way for me to quickly scroll to where my command starts?

share|improve this question

migrated from stackoverflow.com Jul 31 '11 at 11:30

This question came from our site for professional and enthusiast programmers.

1  
I use a colored prompt for this reason :-) –  Paŭlo Ebermann Jul 30 '11 at 23:50

2 Answers 2

pipe to the 'less' command like

cat foo |less

that means less is running and you will have to leave less with the 'q' key to get back to bash less allows you to search or move quickly to the top.

share|improve this answer
1  
1 more thing. this pipes stdout to less. not stderr. so error messages get lost, more or less –  marinara Jul 31 '11 at 10:35
1  
To merge stderr into stdout, do cat foo 2>&1 | less. –  Thomas Jul 31 '11 at 10:39

you can redirect(>) the output from command to a file and then get what you want. i don't have any idea to scroll where the command starts precisely. by the way, different terminals have different features and not all terminals support the feature which you want.

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.