【发布时间】:2015-02-20 20:02:05
【问题描述】:
/bin/mv /myhome/templocation/images/*.iso /storage/data/repository/ >/dev/null 2>&1
我希望这个命令将 /myhome/templocation/images 中的 iso 移动到 /storage/data/respository。
但是,所见有所不同。在脚本结束时,整个图像文件夹被移动到
/storage/data/repository/.
例如:/storage/data/repository/images/*.iso ...但我希望脚本将 .iso 复制到 /storage/data/respository/*.iso/
我哪里错了..??由于此 shell 脚本在系统启动期间运行,我无法调试。 任何建议。
这种行为出现在 CentOs6 上。
【问题讨论】:
-
你展示了一行代码,但你谈论的是一个脚本。你还有什么需要给我们看的吗?
-
尝试使用该命令;没有脚本的其余部分。
-
也;您希望副本位于
/storage/data/repository/或子文件夹中? -
感谢您的回复。我想将它复制到 /storage/data/repository/ 中。我不想要任何子文件夹。如果我在 shell 上尝试该命令,它工作正常。