简体   繁体   English

如何在 ssh 控制台中将文件夹的所有文件移动到另一个文件夹?

[英]How to move all files of a folder to another folder in ssh console?

I have tree structure like in the same level我有同级别的树结构

  • public_html public_html

  • connection联系

& inside the public_html I have & 在 public_html 我有

  • conn连接

so I want to move all the files & folder of folder public_html/conn to connection folder which is in the level of public_html,so which exact command of ssh can give me the result?所以我想将文件夹public_html/conn的所有文件和文件夹移动到public_html级别的连接文件夹,那么ssh的哪个确切命令可以给我结果?

If you want the folder conn to be inside connection :如果您希望文件夹conn位于connection内部:

mv -i public_html/conn/ connection

Alternatively, if you want the files inside conn , but not the conn folder itself, to be inside connection :或者,如果您希望conn的文件而不是conn文件夹本身在connection内部:

mv -i public_html/conn/* connection
mv -i public_html/conn/.* connection

Would definitely suggest doing man mv beforehand to avoid making a mistake.肯定会建议事先做man mv以避免犯错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将所选文件一个文件夹移动到另一个带子文件夹的文件夹中 - How to move selected files one folder to another folder with sub folder also 如何使用find和xargs将文件从一个文件夹中的一个文件夹移动到另一个文件夹? - How do you use find and xargs to move files from a folder within a folder to another folder? 如何将所有文件和文件夹移动到同一文件夹的子文件夹中 - How to move all files and folders into a subfolder of the same folder 移动和删除文件夹中所有与grep匹配的文件 - Move and delete all files matching grep in folder 消除子文件夹,将所有文件移动到一个文件夹中 - Eliminating subfolders to move all files into one folder 如何将旧文件移动到另一个文件夹 - How to move old file to another folder 如何使用Linux(debian)命令行将所有类型的文件file1.ext,.file2ext和.anotherext从文件夹移动到另一个文件夹? - How to move all the type file file1.ext, .file2ext and .anotherext from folder to another folder with linux (debian) command line? 将文件移动到另一个文件夹,包括文件名中的创建日期 - Move files to another folder, including creation date in filename 将特定文件从一个文件夹移动到另一个文件夹的脚本 - Script to move specific files from one folder to another Linux将不以字符串开头的txt文件移动到另一个文件夹 - Linux Move txt files not start with String to Another folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM