Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

File location if target path not specified with scp command

Tags:

scp

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.

like image 625
user3780714 Avatar asked Aug 25 '14 21:08

user3780714


People also ask

Where do SCP files go?

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.

What is the default SCP 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.

How do I copy a directory using SCP in Linux?

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.

What is SCP path?

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.


1 Answers

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.

like image 98
wrdieter Avatar answered Oct 14 '22 15:10

wrdieter