无法将除目录之外的所有文件移动到终端中的文件夹

发布于 2024-07-17 18:51:05 字数 291 浏览 5 评论 0原文

我在 Bash 中启用了扩展正则表达式,

shopt -s extglob

它们可能对解决问题有用。

我运行以下命令失败,因为它还移动目录,

$ mv `find . -maxdepth 1` django-tes/

我试图找到除目录之外的所有文件并将它们移动到名为 django-tes/ 的目录。

如何将文件夹中除目录之外的所有文件移动到终端中的文件夹

I have extended regexes enabled in my Bash by

shopt -s extglob

They may be useful in solving the problem.

I run the following unsuccessfully, since it moves also directories

$ mv `find . -maxdepth 1` django-tes/

I am trying to find all files except directories and move them to a directory called django-tes/.

How can you move all files except directories in a folder to a folder in terminal?

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

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

发布评论

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

评论(1

望喜 2024-07-24 18:51:06

尝试使用 find 。 -类型f -最大深度1

Try using find . -type f -maxdepth 1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文