Terminal Output Query

The place to post if you need help or advice

Moderators: ChriThor, LXF moderators

Terminal Output Query

Postby Fat_Tuesday » Tue Aug 27, 2013 7:59 pm

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?


Posts: 98
Joined: Mon Oct 09, 2006 12:14 pm

Postby MartyBartfast » Tue Aug 27, 2013 8:19 pm

Code: Select all
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.
LXF regular
Posts: 842
Joined: Mon Aug 22, 2005 7:25 am
Location: Hants, UK

Postby Fat_Tuesday » Tue Aug 27, 2013 9:10 pm

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 :-)
Posts: 98
Joined: Mon Oct 09, 2006 12:14 pm

Postby Rhakios » Tue Aug 27, 2013 10:06 pm

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
User avatar
Posts: 7634
Joined: Wed Apr 06, 2005 11:18 pm
Location: Midlands, UK

Postby nelz » Tue Aug 27, 2013 10:14 pm

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)
User avatar
Site admin
Posts: 9048
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby Fat_Tuesday » Wed Aug 28, 2013 4:00 pm

Thanks gents!
Posts: 98
Joined: Mon Oct 09, 2006 12:14 pm

Return to Help!

Who is online

Users browsing this forum: Google [Bot] and 2 guests