PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.security.ssh > puTTy
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.security.ssh SSH secure remote login and tunneling tools.

puTTy

Réponse
 
LinkBack Outils de la discussion
Vieux 24/10/2006, 19h32   #1
fnibogey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut puTTy

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?

  Réponse avec citation
Vieux 24/10/2006, 19h48   #2
Todd H.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: puTTy

"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/
  Réponse avec citation
Vieux 25/10/2006, 17h24   #3
fnibogey
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: puTTy


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

  Réponse avec citation
Vieux 25/10/2006, 17h46   #4
Todd H.
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: puTTy

"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/
  Réponse avec citation
Vieux 31/10/2006, 15h20   #5
Brian Pence
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: puTTy

> 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


  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 22h53.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10367 seconds with 13 queries