I tried to copy the file from remote to my local directory but I am getting an error No such file or directory.
Below is the command I used to copy
scp username#remoteserver.xxx:/path to the file/filename /path to the local directory/
All the paths I copied using pwd.
Do you get "No such file or directory" for the
/path to the file/filename
or the
/path to the local directory/
part? If it's the first, then you might have an issue with the path itself. If it's for the second then specifying localuser#localmachine:/path to the local directory/ might fix it. If you're on the same LAN, you could also try localuser#localmachineip:/path to the local directory/
Related
I have to copy the files in local folder to sftp location using pentaho.
i have tried with "copy step"step from spoon jobs by providing local path in file/folder source path and sftp details file/folder destination.
while executing i am getting error like "File system exception : could not find file in the files /path".
please let me know how to resolve it.
i did copying files from sftp to local folder using same "copy file" step by proving sftp details in file/folder source path and local path file/folder destination, it is working.
i have defined vfs parameters also in job.
Thanks
You should try the "Get file with SFTP" and "Put file with SFTP" entries instead.
Both have support for authentication via username/password or private key.
"copy files" will not be the best option here.
Try using "Get a file with SFTP"
I'm trying to download a file using scp
I run
scp user#ip:/home/user/file.gzip $HOME/Desktop
I get
file.gzip 100% 156MB 155.8MB/s 00:01
but the file is not found
I tried on Ubuntu and Windows and the results is the same. And I tried with another destiny folder, but the file don't found.
Please I appreciate any help
Using that syntax, scp will attempt to save the file with the name 'Desktop'
Instead, save it inside your home folder by specifying a filename explicitly:
scp user#ip:/home/user/file.gzip $HOME/file.gzip
Or, to preserve the original filename and save inside your 'Desktop' folder, append forward slash period:
scp user#ip:/home/user/file.gzip $HOME/Desktop/.
I'm not sure how to set the publication settings...
... My RPi is at 192.168.2.126, and is running Apache and ftp.
... The site is to be located in the folder /var/www/GarageDoor on the RPi
... The site is accessed as http://192.168.2.126/GarageDoor/GarageDoors.html
I'm also concerned because my ftp client can't move the file(s) associated with this site directly to /var/www/GarageDoor either. I end up transferring them to my /usr folder, then copying the files manually to the /var/www... folder.
Seems like you need "sudo" permission to copy a file to this folder. I can't figure out how to give either Kompozer or my ftp client such permission. (I'm using bitvise sftp client)
Any ideas would be appreciated.
This sounds a lot like a permissions error. Enter the following into the raspberry pi command line:
sudo chmod 777 /var/www/GarageDoor/GarageDoors.html
Because that would make the file readable by anyone. If that doesn't work, try the +x option to make the file executable.
sudo chmod +x -R /var/www/GarageDoor
Note on the second command: This will make all files in /GarageDoor have executable permissions. (-R is for recursive)
I'm trying to use scp to copy recursively from a local directory to a remote directory.... I have created the folders on the remote side:
Remote Location (already created):
/usr/local/www/foosite
I am running scp from the local machine in directory:
/usr/local/web/www/foosite
But it's copying the "foosite" directory as a subdirectory... I just want the contents of the folder, not the folder itself...
Here is the command I'm using:
scp -r /usr/local/web/www/foosite scpuser#216.99.999.99:/usr/local/www/foosite
The problem is that if you don't use the asterisk (*) in the local part of the call, scp will create a new top level directory in the remote server. It should look like this:
scp -r /usr/local/web/www/foosite/* scpuser#216.99.999.99:/usr/local/www/foosite
This says "Copy the CONTENTS" (but not the directory itself) to the remote location.
Hope this helps... Took me an hour or so to figure this out!!!
Old question, but I think there is a better answer. The trick is to leave the foosite directory off of the destination:
scp -r /usr/local/web/www/foosite scpuser#216.99.999.99:/usr/local/www
This will create the foosite directory on the destination if it does not exist, but will just copy files into foosite if the directory already exists. Basically the -r option will copy the last directory in the path and anything under it. If that last directory already exists on the destination, it just doesn't do the mkdir.
I SCP ed to copy files successfully, i.e. the transfer shows it's successful, but I don't see anything in my local folders.
The command:
scp name1#server1.edu:/file/*.* ~/Desktop/
I am running Debian, if that might be of some help.
Check the SFTP home path.Your successfully transferred files are copied by default to this path.Hope this will help you !