get and put commands? | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

get and put commands?

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 12-01-2008
mike314 mike314 is offline
Registered User
 
Join Date: Nov 2008
Last Activity: 3 May 2009, 6:16 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
get and put commands?

I'm using Putty and sftp files from my local machine onto a file server. Problem is I dont know how to use the get and put commands. I have the putty.exe on my desktop.

example
get foo.txt c:\documents and settings\michael\desktop

I would like to get the text file foo and put it on my desktop, but I'm getting a "No such file or directory" error. Is this the proper way to use get?

thanks
Sponsored Links
    #2  
Old 12-01-2008
nj78 nj78 is offline
Registered User
 
Join Date: Jul 2005
Last Activity: 10 December 2010, 4:55 PM EST
Location: Northern California
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
You are trying to get a file named "foo.txt c:\documents and settings\michael\desktop".

Just try get "file". Make sure you are in the proper dir you are pulling from.
Sponsored Links
    #3  
Old 12-01-2008
mike314 mike314 is offline
Registered User
 
Join Date: Nov 2008
Last Activity: 3 May 2009, 6:16 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
still getting some errors, heres the command:
get foo.txt

Fetching /content/tmp/recent/foo.txt to foo.txt
Couldn't open local file "foo.txt" for writing: Permission denied


When I sftp, I cd to the dir where foo.txt is located. /content/tmp/recent/foo.txt is its full path. I basically want to grab it and place it on my desktop.

thanks
    #4  
Old 12-01-2008
nj78 nj78 is offline
Registered User
 
Join Date: Jul 2005
Last Activity: 10 December 2010, 4:55 PM EST
Location: Northern California
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
You are on the right path, now the problem is you already have a copy of that file on your desktop. You need to rename it or remove.
Sponsored Links
    #5  
Old 12-01-2008
mike314 mike314 is offline
Registered User
 
Join Date: Nov 2008
Last Activity: 3 May 2009, 6:16 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
weird, I dont have that file on my desktop currently. I tried this

get foo.txt sample.txt

and this same error come up Couldn't open local file "sample.txt" for writing: Permission denied.

if there an additional param to specify inorder to be able to write to my local machine?
Sponsored Links
    #6  
Old 12-01-2008
nj78 nj78 is offline
Registered User
 
Join Date: Jul 2005
Last Activity: 10 December 2010, 4:55 PM EST
Location: Northern California
Posts: 115
Thanks: 0
Thanked 0 Times in 0 Posts
I don't know.

Open a cmd window, cd in dos to your desktop:

c:
cd documents and settings\username\desktop

then run psftp

open <hostname>

then try to get a file from the home dir you are in. It sounds like this is what you are doing though. Maybe you are in a folder you can't write in??
Sponsored Links
    #7  
Old 12-01-2008
mike314 mike314 is offline
Registered User
 
Join Date: Nov 2008
Last Activity: 3 May 2009, 6:16 PM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
ok how about this can you write a sample syntax usage of get or put?

thanks
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
All my Commands GONE =( !! yjk2121 UNIX for Advanced & Expert Users 1 04-06-2012 03:59 AM
HACMP: difference between 'cl' commands and 'cli' commands peppix AIX 0 06-21-2011 03:43 AM
Can BASH execute commands on a remote server when the commands are embedded in shell bash_in_my_head Shell Programming and Scripting 1 12-04-2008 01:51 AM
code that reads commands from the standard i/p and executes the commands Phrozen Smoke Programming 4 01-22-2007 02:06 AM
need help with some commands please mujtba UNIX for Dummies Questions & Answers 2 01-14-2005 02:49 PM



All times are GMT -4. The time now is 08:28 PM.