how to scroll or page up n down past top of terminal window
When I use weblish the screen does not allow navigation through stdout display back above the top of the window. Much information is inaccessible and the most I see is the end of the stdout.
I have used redirect to file then open that file with less which is good enough with help files. If I try this with an apt install there is a write to the file but I can not tell how close to the stdout the text is. Also, I am not able to see if the install occurred or if there was only a write to the redirect file. I can figure this out later.
For now could you tell me is there a better way to do this?
I search for it online some time now and have not seen anyone post across the stackexchange based forums any question of the sort. I have tinkered around with redirect to file not much more do I know.
Thanks in advance!
5 Replies
✓ Best Answer
I guess I'm not understanding…
You don't have to create a file when you do redirection…you can use a pipe:
apt <whatever> 2>&1 | less
and then use the file navigation commands on whatever less(1) is showing you. 2>&1
means 'intersperse stderr with stdout'…hopefully you can tell the difference.
apt
will i/o suspend when the pipe gets full and less(1) hasn't consumed it all yet.
-- sw
You write:
I have used redirect to file then open that file with less which is good enough with help files.
less(1) has file navigation commands:
https://www.thegeekstuff.com/2010/02/unix-less-command-10-tips-for-effective-navigation/
-- sw
stevewi and who ever else may read this:
I guess I am actually trying to ask if there is way to back forth through stdout that does not require a redirect to file then read file with app. I am trying to cut-out these two steps inorder to save time, space and thought processes.
When I wrote:
I have used redirect to file then open that file with less which is good enough with help files.
I was wrong to phrase it that way.
Funny is if I could back forth through stdout I could read the help files easier and not need to search online for answers.
Stevewi:
Thanks for the help. That is really what I was looking for yet just could not remember. I have been bouncing all over the place between languages and the Windows os. Kind of hard to make stuff stick without using it but this time I got it and will be able to move forward with a better way to read the help files. I feel crushed for time and needed this one tid-bit to give me an edge forward, I really appreciate it, thanks!
You're welcome. If you are using Windows as a client, you can install a Linux VM on your Windows machine using Hyper-V:
https://techtipvault.com/guides/linux-virtual-machine-on-windows/
Also, nearly all the ssh* commands are available using cmd.exe:
https://softwarerecs.stackexchange.com/questions/3000/ssh-implementation-for-cmd-exe
-- sw