To copy a folder from local computer to server I use
scp -r local_folder user@server:path
Now I forgot to specify the target path the first time:
scp -r local_folder user@server
Does anyone now if the folder has been copied and if yes, where in the server is it located at?
I issued the correct command later and copied the folder to my user directory but I just want to know whether the folder is also copied somewhere on the server the first time and find and delete it. I am a user and don't have permission to search the whole server. Thanks.
Copy Files and Directories Between Two Systems with scpThe /remote/directory is the path to the directory you want to copy the file to. If you don't specify a remote directory, the file will be copied to the remote user home directory.
By default, scp downloads a single file or folder which is specified. In order to download a complete directory, the -r option should be specified which will download the remote directory recursively. Recursive means downloading everything inside the directory and its contents.
To copy a directory (and all the files it contains), use scp with the -r option. This tells scp to recursively copy the source directory and its contents. You'll be prompted for your password on the source system ( deathstar.com ). The command won't work unless you enter the correct password.
SCP stands for Secure Copy Protocol. It is a tool that can be used to transfer files from a local host to a remote host, from a remote host to a local host, or between two remote hosts.
When you use user@server
without a ':' character, scp interprets user@server
as the file name on the local machine to which you would like to copy your file. So, you should find a file (or in this case a directory) called user@server
in the directory from which you issued the scp -r local_folder user@server
command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With