Linux Format forums Forum Index Linux Format forums
Help, discussion, magazine feedback and more
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Terminal Output Query

 
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help!
View previous topic :: View next topic  
Author Message
Fat_Tuesday



Joined: Mon Oct 09, 2006 1:14 pm
Posts: 89

PostPosted: Tue Aug 27, 2013 8:59 pm    Post subject: Terminal Output Query Reply with quote

Hi all, playing with nmap and it's taking a while. If I run a command in the terminal and get output from it, is it possible to get that output piped somewhere *after* the command has been run, or do I have to re-run the command with the pipe?

Cheers

FT
Back to top
View user's profile Send private message
MartyBartfast
LXF regular


Joined: Mon Aug 22, 2005 8:25 am
Posts: 804
Location: Hants, UK

PostPosted: Tue Aug 27, 2013 9:19 pm    Post subject: Reply with quote

Code:

nmap -blah -blah -blah | tee output.log


will display the output from nmap as it's running while also sending the it to output.log
_________________
I have been touched by his noodly appendage.
Back to top
View user's profile Send private message
Fat_Tuesday



Joined: Mon Oct 09, 2006 1:14 pm
Posts: 89

PostPosted: Tue Aug 27, 2013 10:10 pm    Post subject: Reply with quote

Cheers Marty but I was hoping to capture the output that's already on display in bash, after the command has run. Other than copy n paste that is. I could have explained myself better but it's been a long day etc etc Smile
Back to top
View user's profile Send private message
Rhakios
Moderator


Joined: Thu Apr 07, 2005 12:18 am
Posts: 7602
Location: Midlands, UK

PostPosted: Tue Aug 27, 2013 11:06 pm    Post subject: Reply with quote

By definition a pipe can only redirect something that's in the process of "flowing". Given what you want, I don't see the problem with copy and paste.
_________________
Bye, Rhakios
Back to top
View user's profile Send private message
nelz
Site admin


Joined: Mon Apr 04, 2005 12:52 pm
Posts: 8364
Location: Warrington, UK

PostPosted: Tue Aug 27, 2013 11:14 pm    Post subject: Reply with quote

Another option, that also requires you to know you want it in advance, is script.
_________________
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
Back to top
View user's profile Send private message
Fat_Tuesday



Joined: Mon Oct 09, 2006 1:14 pm
Posts: 89

PostPosted: Wed Aug 28, 2013 5:00 pm    Post subject: Reply with quote

Thanks gents!
Back to top
View user's profile Send private message
View previous topic :: View next topic  
Display posts from previous:   
Post new topic   Reply to topic    Linux Format forums Forum Index -> Help! All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Linux Format forums topic RSS feed 


Powered by phpBB © 2001, 2005 phpBB Group


Copyright 2011 Future Publishing, all rights reserved.


Web hosting by UKFast