LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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
  Search this Thread
Old 01-02-2008, 11:55 AM   #1
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 675
Blog Entries: 11

Rep: Reputation: 36
command output redirection


I know if I execute a command like 'ls' and I want the output in a file, I can type 'ls > filename'. What do I type if I want both a saved version and the output of ls on the screen at the same time. I'm using 'ls' as an example, really I want to execute 'aptitude' and at the same time save the output to a file and see the output on the screen. I'm a debian user. Thanks in advance for any help.

Last edited by radiodee1; 01-02-2008 at 11:56 AM.
 
Old 01-02-2008, 12:24 PM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 71
ls | tee outputfile.txt
man tee
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Output redirection??? ed_po Linux - Newbie 3 06-13-2006 01:17 PM
tar command output redirection ah_kayyali Linux - Newbie 4 03-19-2006 07:30 AM
what is output redirection? LinuxPadawan General 5 05-18-2005 01:53 PM
Output redirection rmartine Linux - Newbie 2 01-25-2005 07:31 PM
Output redirection legtester Linux - General 4 07-07-2003 03:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:37 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