LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-21-2006, 12:15 PM   #1
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Rep: Reputation: 31
Capture output from another computer


I was wondering if anyone could tell me the best way to list data from another linux machine and save the output to a file on the local machine.

I have two machines using a passwordless entry with ssh. I want to list the directories of the remote machine and have the output saved onto my local machine.

When I run:

Code:
ssh remoteLinux ls /tmp
I can see a list of files on the remote machine. I just want a the screen output to be placed in a file on my local machine.

Thanks for the help! I'm sure this is an easy one.
 
Old 09-21-2006, 12:22 PM   #2
mijohnst
Member
 
Registered: Nov 2003
Location: Huntsville, AL
Distribution: RHEL, Solaris, OSX, SuSE
Posts: 401

Original Poster
Rep: Reputation: 31
I think I figured it out.

Code:
ssh remoteLinux ls /tmp >>/home/mijohnst/filelist.txt
I don't know what I was doing before, but now when I put the ">>/home/mijohnst/filelist.txt" it does save it to a local file.
 
Old 09-21-2006, 03:58 PM   #3
Sugarat
Member
 
Registered: Sep 2003
Posts: 71

Rep: Reputation: 15
As you've figured out then - putting > filename.txt after any command will redirect the standard out (console) to a file instead.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
capture the output to a variable Melsync Linux - General 4 09-07-2006 02:17 PM
Bash script- capture cdparanoia text output code-breaker Linux - Software 7 08-03-2006 10:13 PM
can't capture 'at' command standard output to a file bartoni Linux - General 3 02-28-2006 03:52 PM
Capture 'make' Output to File Kenji Miyamoto Linux - Software 4 05-23-2005 05:56 PM
capture make's output gboutwel Linux - Newbie 2 07-07-2002 05:15 AM


All times are GMT -5. The time now is 12:19 PM.

Main Menu
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