Hi,
I should copy a file from my computer in folder on a server.
I use
sftp account@computername
and insert the password.
then I write
sftp> put /home/path/file
to copy the file in my accont folder but this command doesn't work and it says that it couldn't find the file.
Hope I was clear, anyway if it's not please excuse me.
I'm not an expert at all.
What can I do?
Thanks.
put /home/path/filename
The error you got says that filename was not found. On the computer you are sending FROM. It means you either did not spell it correctly or you got the wrong name.
files have two parts to their name
/path/to/directory
this is the directory (or windows speak a folder) the file lives in
myfile is an example file name, not a complete file specification either.
so:
/path/to/directory/myfile is a complete file specification
Before you sftp, try
This MUST show your file back to you, with no error.
Hi, thank you.
I didn't see if you told me to write right
ls /path/to/directory/hm.c
in the terminal...anyway if so, it doesn't work and terminal says:
ls: impossibile accedere a /path/to/directory/hm.c: Nessun file o directory
that is, traslated from italian, "it is impossible to access tp /path/to/directory/hm.c: No file or directory"
(hm.c is the file I should copy)
If I write ls and the supposed path i used to write, the terminal writes again the path I supposed to be true so just can't see why it couldn't find it when i used sftp connection.
Hi,
I have a requirement where I have to connect to another server and copy directories from one server to another
Directories on the Source server look like below (YYYY-MM-DD- 1 to 23)
drwxr-xr-x 2 test_user dmfmart 422 Sep 1 23:45 2014-09-01-18drwxr-xr-x 2 test_user dmfmart ... (1 Reply)
Hi,
I have a files in a directory as below :-
ls -1
mqdepth-S1STC02
proc-mq-S1STC01
proc-mq-S1STC02
proc-mq-S1STC03
Whereever i have S1STC i need to copy them into new file with file name S2STC.
expected output :-
ls -1
mqdepth-S2STC02
proc-mq-S2STC01
proc-mq-S2STC02... (3 Replies)
hi,
i am using sftp to transfer files between two servers,
if i connect to a remote server using sftp n moves a file say "S123.txt" to the remote server, it moves successfully, but when i try to execute the same sftp script to move the same files to the same remote server, the old file is... (3 Replies)
I had the below sftp script working perfectly but the problem is I am not able to send the echo statements .
#!/bin/sh
echo "Starting to sftp..."
sftp admin@myip << END_SCRIPT
cd /remotepath/
lcd /localpath/
mget myfiles*.csv
bye
END_SCRIPT
echo "Sftp successfully."
echo
echo... (11 Replies)
Hello,
I have a weird issue, I have RHEL 5.7 running with openssh5.2 where sftpgroup OS group is chroot. I see the difference difference in timestamp on files, when I login via ssh and SFTP, I see four hour difference, is something missing in my configuration.
#pwd... (8 Replies)
Hi experts
cp bin root src /mnt
but not copy bin/bigfile
any help?
( I post this thread in the "redhat" forum wrongly, I don't know how to withdraw that question in that wrong forum)
Thanks (6 Replies)
Hi,
I have situation where i need to automate transferring 10000+ files using sftp.
while read line
do
if ; then
echo "-mput /home/student/Desktop/folder/$line/* /cygdrive/e/folder/$line/">>sftpCommand.txt
fi
done< files.txt
sftp -b sftpCommand.txt stu@192.168.2.1
The above... (1 Reply)
Hi,
I am currently using SFTP 'put' command to copy all files to remote server and then delete the copied files from source directory.
Can anyone help me with a single command to copy and remove files in one go?
Thanks and Regards,
Chetan Vyas (5 Replies)
Hi All,
In my unix server, I have the following files:
h1.txt
h2.txt
h3.txt
and through SFTP i need to copy only the latest file to another unix server.
Can you please let me know what command i need to use.
Thanks in Advance, (2 Replies)