将目录解压到其父目录中

发布于 2024-08-07 13:41:42 字数 212 浏览 1 评论 0原文

我在一个文件夹(我网站的主 html 目录)中有一个目录 (wordpress),我想将其“解压”到主 html 目录中。也就是说,我想删除 wordpress 目录,并将其所有子目录放在 /html/ 下,而不是 /html/wordpress/.我该怎么做?

I've got a directory (wordpress) in a folder (the main html directory of my website) and I'd like to "unpack" it into the main html directory. That is to say, I'd like to remove the wordpress directory and have all its subdirectories be under /html/ instead of /html/wordpress/. How do I do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

装纯掩盖桑 2024-08-14 13:41:42
$ cd /html/wordpress
$ mv * ..
$ cd ..
$ rmdir wordpress

您需要更复杂的东西吗?

$ cd /html/wordpress
$ mv * ..
$ cd ..
$ rmdir wordpress

Do you need something more complicated?

爱情眠于流年 2024-08-14 13:41:42
mv /path/to/html/wordpress/* /path/to/html
rmdir /path/to/html/wordpress

应该有效

mv /path/to/html/wordpress/* /path/to/html
rmdir /path/to/html/wordpress

Should work

去了角落 2024-08-14 13:41:42
mv /html/wordpress/* /html
rmdir wordpress
mv /html/wordpress/* /html
rmdir wordpress
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文