如果未使用 scp 命令指定目标路径,则文件位置 [英] File location if target path not specified with scp command
问题描述
将文件夹从本地计算机复制到我使用的服务器
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.
推荐答案
当您使用 user@server
时不带 ':' 字符,scp 将 user@server
解释为您要将文件复制到的本地计算机上的文件名.因此,您应该在发出 scp -r local_folder user@server
命令的目录中找到一个名为 user@server
的文件(或在本例中为目录).
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 命令指定目标路径,则文件位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!