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 09-24-2005, 07:20 PM   #1
darkarcon2015
Member
 
Registered: Jun 2004
Location: Potsdam, NY
Distribution: Fedora Core 6
Posts: 201

Rep: Reputation: 30
Output the result of a command to a file


I was wondering how I can take the result of running a command (such as `ls') and outputting the result to a file. Thanks for any help.

EDIT: Oops, I remembered `ls > file.txt'

Last edited by darkarcon2015; 09-24-2005 at 07:22 PM.
 
Old 09-24-2005, 07:29 PM   #2
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
Or "ls > file". Extensions have no meaning in Linux, so there's no need to put the .txt. (Really just posting so others don't think the problem hasn't been solved.)
 
  


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
Command line to get output on a file satimis Programming 4 06-24-2005 07:04 AM
How to write down result of performance of a command in a file ukrainet Linux - Newbie 3 12-08-2004 10:51 AM
php: output the result of exec( $command ) zovres Programming 6 08-27-2004 07:41 PM
how to use the output of a file for input of a command sneak Linux - General 2 05-12-2004 10:21 AM
Help: Command Output to File. rvijay Linux - Newbie 3 09-30-2003 10:02 AM


All times are GMT -5. The time now is 10:26 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration