|
|
|
|
||||||
| comp.security.ssh SSH secure remote login and tunneling tools. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Please a total noob. I'm using puTty to access a linux server. I
grep strings from compressed directories. I would then like to be able to search those results on my puTTy screen. Is this possible? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
"fnibogey" <finbogey@yahoo.ca> writes:
> Please a total noob. I'm using puTty to access a linux server. I > grep strings from compressed directories. I would then like to be able > to search those results on my puTTy screen. Is this possible? Yes, but it's neither an ssh or putty question really. It's more of a unix shell question. But try this: $ strings bigdirectoryiwannagrep/* | grep myfavoritegrepstring | less Space bar pages down, b takes you back a screen in less anyway, capital G to get to the end, capital P to get back to teh beginning. If less isn't available as a pager on that system, try $ strings bigdirtory/* | grep blah | more More more info: $ man less $ man more Best Regards, -- Todd H. http://www.toddh.net/ |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
Todd H. wrote: > "fnibogey" <finbogey@yahoo.ca> writes: > > > Please a total noob. I'm using puTty to access a linux server. I > > grep strings from compressed directories. I would then like to be able > > to search those results on my puTTy screen. Is this possible? > > Yes, but it's neither an ssh or putty question really. It's more of a > unix shell question. But try this: > > $ strings bigdirectoryiwannagrep/* | grep myfavoritegrepstring | less > > Space bar pages down, b takes you back a screen in less anyway, > capital G to get to the end, capital P to get back to teh beginning. > > If less isn't available as a pager on that system, try > > $ strings bigdirtory/* | grep blah | more > > More more info: > > $ man less > $ man more > > Best Regards, > -- > Todd H. > http://www.toddh.net/ Thanks Todd, I'll try these. So I take it there is no way to actually search these results of a grep short of outputting it to a text file and searching that? The guy next to me uses a Mac and his terminal program lets him search the screen. It would save a few steps. Grant |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
"fnibogey" <finbogey@yahoo.ca> writes:
> Todd H. wrote: > > "fnibogey" <finbogey@yahoo.ca> writes: > > > > > Please a total noob. I'm using puTty to access a linux server. I > > > grep strings from compressed directories. I would then like to be able > > > to search those results on my puTTy screen. Is this possible? > > > > Yes, but it's neither an ssh or putty question really. It's more of a > > unix shell question. But try this: > > > > $ strings bigdirectoryiwannagrep/* | grep myfavoritegrepstring | > > less [snip] > > Thanks Todd, I'll try these. > > So I take it there is no way to actually search these results of a grep > short of outputting it to a text file and searching that? I think the concept you may be missing is what a the pipe (|) character does. It obviates the need to put output into a disk file and handles things "on the fly" if you will. The command above looks for strings in all files in bigdirctoryiwannagrp, pipes the standard output (stdout) to the grep function which searches among those string for lines that match myfavoritegrepstring, and then pipes that to a program that allows you to page through the output (which is very handy if you get more than a screen full of output). > The guy next to me uses a Mac and his terminal program lets him search > the screen. It would save a few steps. Interest--didn't know it had that feature. That would be a client side way of doing it, but what if the terminal program has a scrollback buffer set to something smaller than the output you've created? You may miss something. That's why it's better to handle the output yourself, in my opinion. However, there's another command line program that'll do what you want. $ screen It can search it's history, but I've never had occasion to do that. Not the answer you wanted, but some ideas anyway. Best Regards, -- Todd H. http://www.toddh.net/ |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
> The guy next to me uses a Mac and his terminal program lets him search
> the screen. It would save a few steps. > AbsoluteTelnet has screen search capability. Use Edit->Find and enter a word or phrase. All occurrences of that word will display in reverse red blinking text. Find->Previous and Find->next will seek to places in the scrollback where the word exists. Very handy. Saves time. http://www.celestialsoftware.net Brian Pence Celestial Software |
|
![]() |
| Outils de la discussion | |
|
|