gpt4 book ai didi

linux - Bash shell 提示我没有使用的无效选项...仅适用于 *.mp4 文件扩展名

转载 作者:太空宇宙 更新时间:2023-11-04 04:38:48 25 4
gpt4 key购买 nike

我有一堆 MP4 文件,如下所示:

-rw-rw-r-- 1 116M Apr 19 06:08 lULIqx9Akn4.mp4

这些是 YouTube 视频。当我尝试对所有这些进行操作时,我收到一个奇怪的错误。我尝试的每个命令都表明我正在使用无效选项(我没有使用)。以下是一些示例。

$ ls *.mp4
/bin/ls: invalid option -- '7'
Try '/bin/ls --help' for more information.
$ mv *.mp4 videos/
mv: invalid option -- 'L'
Try 'mv --help' for more information.
$ cp *.mp4 videos/.
cp: invalid option -- '7'
Try 'cp --help' for more information.

它不会使用不同的扩展名(*.mp3、*.txt、*.sh)执行相同的操作。

发生什么事了?我该如何解决这个问题?

我用它作为一种廉价的解决方法,

find . -name "*.mp4" -exec mv {} videos/. \;

但我想了解正在发生的事情,而不仅仅是完成工作。

最佳答案

您的文件名之一以连字符开头,例如。 -7-L。尝试 ls -- *.mp4cp -- *.mp4 视频。另外,请允许我建议UNIX and Linux Stack Exchange对于 shell 问题:) .

关于linux - Bash shell 提示我没有使用的无效选项...仅适用于 *.mp4 文件扩展名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36945032/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com