LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 04-06-2007, 02:36 PM   #1
exl75
Member
 
Registered: Mar 2007
Posts: 54

Rep: Reputation: 15
Question How to copy/save a file from a Linux box to a local drive


Im trying to save or copy a log file or text file from Linux to my local drive.Cant quite find the command to do it.Thanks for any help.

1)I want to save it as a text file(testfile.txt)
2)Then save it to my local drive

$ zcat testfile.log.gz | awk '{print $12"\t"$13}' | less
 
Old 04-06-2007, 02:39 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
not sure what you mean.. maybe: zcat testfile.log.gz > /path/to/output.txt
 
Old 04-06-2007, 02:51 PM   #3
exl75
Member
 
Registered: Mar 2007
Posts: 54

Original Poster
Rep: Reputation: 15
Im trying to do something like this:

$ zcat testfile.log.gz | awk '{print $12"\t"$13}' | less > c:\tmp\output.txt

where I can access output.txt on the local drive.But,im not sure that will work,in fact it does not work.
 
Old 04-07-2007, 01:13 AM   #4
mma8x
Member
 
Registered: Jul 2004
Posts: 164

Rep: Reputation: 30
what's the "local drive"? c:\tmp\output.txt doesn't mean anything in linux--did you try nadroj's suggestion?
 
Old 04-07-2007, 01:36 AM   #5
greeniguana00
Member
 
Registered: Feb 2007
Distribution: Gentoo AMD64
Posts: 42

Rep: Reputation: 15
First you will want to mount the Windows drive with the ability to write (which is kind of dangerous). The Windows drive will then have a mount point (for example /media/win_c ) and then you can treat the Windows drive like any ordinary directory.
 
Old 04-08-2007, 11:12 AM   #6
exl75
Member
 
Registered: Mar 2007
Posts: 54

Original Poster
Rep: Reputation: 15
Yes,I tried nadroj suggestion,that did not work. The local drive c:\tmp\output.txt.
I rsh to linux box,and there is a file there that I want on my local hard drive so I thought there should be an easy way just to get it on c:\tmp\output.txt.
 
Old 04-08-2007, 11:21 PM   #7
mma8x
Member
 
Registered: Jul 2004
Posts: 164

Rep: Reputation: 30
http://www.smileystation.com/win-lin...s/ch02s06.html
 
Old 04-09-2007, 03:50 PM   #8
exl75
Member
 
Registered: Mar 2007
Posts: 54

Original Poster
Rep: Reputation: 15
Basically,all I want to do is to copy a file from a remote linux machine to my local machine.I will take a look at the link,hopefully,by some magic i will find the actual command that Im looking for to allow to do it. Thanks for the suggestions!!
 
Old 04-09-2007, 04:13 PM   #9
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Quote:
Originally Posted by exl75
Basically,all I want to do is to copy a file from a remote linux machine to my local machine.I will take a look at the link,hopefully,by some magic i will find the actual command that Im looking for to allow to do it. Thanks for the suggestions!!
Ah, that makes much more sense! Your first few posts proper confused me, and most likely everyone else

Assuming sshd is running on the remote machine and you are using Windows on your local machine the easiest way would be to use pscp: http://www.chiark.greenend.org.uk/~s.../download.html

Documentation on how to use it: http://the.earth.li/~sgtatham/putty/...tml#pscp-usage
 
Old 04-09-2007, 11:21 PM   #10
exl75
Member
 
Registered: Mar 2007
Posts: 54

Original Poster
Rep: Reputation: 15
Ahh,thats it!! Thank you so much.I knew it was possible but was not sure how and where to get the info,but I thought I explained it well the first time,I guess not.Anyhow,I greatly appreciate it.Just what I needed.
 
Old 04-10-2007, 07:20 AM   #11
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
use SCP

Command Line option would be from the putty ssh suite. (pscp.exe )

or winscp the GUI scp client for windows.. http://winscp.net/eng/download.php
 
Old 04-10-2007, 12:52 PM   #12
exl75
Member
 
Registered: Mar 2007
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks a lot guys!! I will try that and see what happens.
 
  


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
copy files from telnet session to local drive rkemp Linux - Networking 7 03-11-2009 05:01 AM
scp: copy a file from local machine to remote machine seran Linux - Newbie 8 10-30-2007 12:23 PM
Copy file from Server to Local Host foysol_bgd Linux - Newbie 8 02-10-2007 12:35 AM
file copy to other drive eye Fedora 1 09-21-2004 01:32 AM
Cannot Copy Files From Network FAT32/NTFS Drive to My Local Linux Drive michaelh Linux - Networking 3 10-29-2002 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:53 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
Open Source Consulting | Domain Registration