LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 04-20-2012, 03:05 AM   #1
SkM007
LQ Newbie
 
Registered: Jun 2011
Distribution: Oracle, BackTrack
Posts: 28

Rep: Reputation: Disabled
How to Copy Terminal Output to a File


I am using backtrack & a particular s/w (fierce) generates a lot of output on the terminal. I actually want to get this entire output to a txt file but i don't know how to do it. I know i can redirect the output to a file but i dn't want to do it for every command. also the output is very large (varies from 50 - 1000 lines based on the command) that most of the time i can't do copy-paste thing, as earlier commands are not visible (i hope u understood)
if u'll use putty or HT in windows, it has options by which all the activities on the terminal can be saved in txt file.

is there anything i can do???
 
Old 04-20-2012, 07:03 AM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Dehradun, Uttarakhand, India
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,412

Rep: Reputation: 303Reputation: 303Reputation: 303Reputation: 303
If you're using the terminal then the only option is to direct the output of commands in files.
 
Old 04-20-2012, 11:39 AM   #3
ratotopi
Member
 
Registered: Dec 2011
Posts: 105

Rep: Reputation: 6
use the tee command eg
ls -l /root | tee /tmp/rootls
this will out put your command to screen and files but if you want to create file only then do
ls -l /root >> /tmp/rootls
 
Old 04-20-2012, 12:01 PM   #4
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 3,990

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
maybe the script command is what you are looking for
 
Old 04-20-2012, 04:49 PM   #5
jefro
Guru
 
Registered: Mar 2008
Posts: 10,246

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Use of fierce.

"It provides different techniques to gather information about your victim."
 
Old 04-20-2012, 04:53 PM   #6
unkn(0)wn
Member
 
Registered: Aug 2011
Distribution: Slackware 14, Debian 7.0.0 Wheezy, Windows 7, Windows 8
Posts: 116

Rep: Reputation: Disabled
just use ">" between output command and desired filename.

eg. if you want output of a.out in file output.txt, use
Quote:
./a.out > output.txt
and to append use ">>"

hope it helps!

Last edited by unkn(0)wn; 04-20-2012 at 04:59 PM.
 
Old 04-21-2012, 05:43 AM   #7
SkM007
LQ Newbie
 
Registered: Jun 2011
Distribution: Oracle, BackTrack
Posts: 28

Original Poster
Rep: Reputation: Disabled
Ok, then i m left with the option of redirecting & appending the output

anyway, thanks everyone
 
  


Reply

Tags
backtrack, terminal


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy/paste output from shell (not terminal) bluegospel Linux - Newbie 13 07-21-2010 01:37 PM
file copy by terminal manomohan Ubuntu 6 05-29-2007 09:44 PM
file copy by terminal manomohan Linux - Networking 1 05-24-2007 07:04 AM
Redirect terminal output to file AND terminal shan Linux - General 3 09-29-2006 08:36 AM
Copy output of Terminal Buffer tryangle Debian 2 08-08-2005 04:09 PM


All times are GMT -5. The time now is 05:34 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration