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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
01-06-2005, 12:31 PM
|
#1
|
Member
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413
Rep:
|
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 ?
|
|
|
01-06-2005, 01:09 PM
|
#2
|
LQ Newbie
Registered: Dec 2004
Posts: 16
Rep:
|
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.
|
|
|
01-06-2005, 01:41 PM
|
#3
|
LQ Guru
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 11:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|