linux – mv命令变得疯狂

linux – mv命令变得疯狂,第1张

概述这是脚本,我已经挑出了我认为导致最近问题的块 mv sourcefile targetfile > /dev/null 我知道,如果目标文件存在,mv将默认覆盖而不要求确认.因此,脚本(上图)是正确的. mv: try to overwrite `targetfile', overriding mode 0644 (rw-r--r--)? 它提示/要求确认覆盖的唯一时间是使用-i选项,在这种情况下 这是脚本,我已经挑出了我认为导致最近问题的块

mv sourcefile targetfile > /dev/null

我知道,如果目标文件存在,mv将默认覆盖而不要求确认.因此,脚本(上图)是正确的.

mv: try to overwrite `targetfile',overrIDing mode 0644 (rw-r--r--)?

它提示/要求确认覆盖的唯一时间是使用-i选项,在这种情况下不使用.它并不总是发生.偶尔d出一下

那么,为什么它会这样呢?

这是我的mv版本

mv (GNU coreutils) 8.12copyright (C) 2011 Free Software Foundation,Inc.license GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.HTML>.This is free software: you are free to change and redistribute it.There is NO WARRANTY,to the extent permitted by law.Written by Mike Parker,DavID MacKenzIE,and Jim Meyering.
解决方法 根据手册页,-f选项具有以下目标:

-f,--force          do not prompt before overwriting
总结

以上是内存溢出为你收集整理的linux – mv命令变得疯狂全部内容,希望文章能够帮你解决linux – mv命令变得疯狂所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1023836.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-23
下一篇 2022-05-23

发表评论

登录后才能评论

评论列表(0条)

保存