Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Save Files On Server To Local Comp

by de2425 (Sexton)
on Aug 24, 2009 at 18:03 UTC ( [id://790883]=perlquestion: print w/replies, xml ) Need Help??

de2425 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks;

Thanks for taking time to look at my question. This may be off-topic since it's more of a UNIX/server question but I thought you might be able to help me. I would like to know if there is a programatic way to run something like wget on a unix server and have the output go to an external hard drive that I have on my local workstation. I honestly have no idea how to go about this so I don't have any code to post. I was just wondering if it was possible and if anyone might be able to show me how to go about it. Thanks so much in advance for your help!!

Replies are listed 'Best First'.
Re: Save Files On Server To Local Comp
by Marshall (Canon) on Aug 24, 2009 at 18:38 UTC
    This goes for both Unix and Windows, if you can type a command at the command prompt (the shell), then you can redirect the output to a file.

    prompt: ls >file prompt: dir >file etc.
    On both Unix and Windows you can also redirect STDOUT and STDERR to different files. On Unix there is a standard program called "tee", ls | tee outfile, will send output to console and also to the file outfile.

    Update:

    This wget thing looks pretty cool:

    http://linux.about.com/od/commands/l/blcmdl1_wget.htm

    But basically, if you can access the directories on the remote machine with a file path using say, 'ls' on Unix, you don't need or want wget.

Re: Save Files On Server To Local Comp
by Taulmarill (Deacon) on Aug 24, 2009 at 18:55 UTC
    You can use ssh to run a command on a remote machine and then redirect the output to a file. man ssh for details.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://790883]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-19 21:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found