View the Most Wanted LQ Wiki articles.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 01-02-2008, 11:55 AM   #1
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
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
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

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


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

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

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