File location if target path not specified with sc

2019-03-24 16:22发布

问题:

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.

回答1:

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.



标签: scp