LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-06-2005, 12:31 PM   #1
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
log the output


how can I get the output of a command on the stdout and also in a file?

i have to telnet on a remote site and I want to log all the output in a file too how can i do that ?
 
Old 01-06-2005, 01:09 PM   #2
stanleyg76
LQ Newbie
 
Registered: Dec 2004
Posts: 16

Rep: Reputation: 0
you can do the following:

% ls | tee /tmp/xx

will show output on the screen and also log it into /tmp/xx file.
Do 'man tee' to see more information about that command.
 
Old 01-06-2005, 01:41 PM   #3
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
u can also use the redirector operator

> and >>
one will make a new file while the other will append the O/P to the existing file if any

ls >> /tmp/test

regards
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configure/make - output log The_JinJ Linux - Newbie 1 12-04-2004 07:28 AM
No output to /var/log/messages or ~syslog eelriver Slackware 5 07-18-2004 05:13 AM
VSFTPD.log nonstandard output RedHat 9 tobyconyers Linux - Newbie 0 11-17-2003 10:56 AM
Log Screen Output to a file sdandeker Linux - Newbie 3 09-17-2003 02:57 AM
Log output change Stephanie_new Linux - General 6 06-18-2002 02:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:24 PM.

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