LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-13-2008, 04:33 AM   #1
cdcshu
Member
 
Registered: Jul 2006
Location: Shanghai
Distribution: Fedora, OpenSUSE
Posts: 31

Rep: Reputation: 16
Possible to see a program output and backup its log at the same time?


Hello,

I am at lost to make it happen. It looks simple but how to?

Using one stone to kill two birds...

loop_many_cycles
loop_many_cycles >> log.txt

Thanks in advance,

cdcshu
 
Old 02-13-2008, 04:38 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
"man tee" ...
 
Old 02-13-2008, 04:41 AM   #3
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Rep: Reputation: 30
Try

Code:
program | tee logfilename.txt
 
Old 02-13-2008, 04:42 AM   #4
ComputerGreek
Member
 
Registered: Sep 2007
Posts: 152

Rep: Reputation: 30
syg00: Gee, that was quick.
 
Old 02-13-2008, 04:46 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,139

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
 
Old 02-13-2008, 05:26 AM   #6
cdcshu
Member
 
Registered: Jul 2006
Location: Shanghai
Distribution: Fedora, OpenSUSE
Posts: 31

Original Poster
Rep: Reputation: 16
Smile It's tee!

Hi,

THANKS A LOT!

loop_many_cycles | tee -a log.txt

cdcshu
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
time --output=log.txt --append sadarax Linux - General 1 05-22-2006 08:46 AM
log the output ilnli Linux - General 2 01-06-2005 01:41 PM
C function to execute a program and return the output of the program ryan.n Programming 4 08-14-2004 10:11 PM
Can log files be time stamped? (such as FTP login and transfer log files) bripage Linux - Networking 6 08-08-2002 10:55 PM
Log output change Stephanie_new Linux - General 6 06-18-2002 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration