我想获取最近1天从服务器到本地生成的多个文件。我正在使用以下命令,其中显示“ No such file or directory”。
find [email protected]:/path-from-which-files-need-to-be-copied/ -type f -ctime -1 | xargs -ILIST scp LIST /Users/abcUser/Documents/test/
错误查找:[email protected]:/需要复制的文件路径/:没有这样的文件或目录
PS:我可以访问此位置,并从该位置访问具有文件名的单个文件。
find
只能找到本地文件。因此,在远程服务器上运行find
,如下所示:
ssh [email protected] find /path-from-which-files-need-to-be-copied/ -type f -ctime -1 |
xargs -ILIST scp [email protected]:LIST /Users/abcUser/Documents/test/