{"id":91015,"date":"2024-03-13T05:40:14","date_gmt":"2024-03-12T21:40:14","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=91015"},"modified":"2024-03-13T05:40:14","modified_gmt":"2024-03-12T21:40:14","slug":"linux-mv","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/linux-mv.html","title":{"rendered":"linux\u57fa\u672c\u547d\u4ee4\u2014\u2014mv\u8be6\u89e3"},"content":{"rendered":"
mv(\u9009\u9879)(\u53c2\u6570)\u00a0\u00a0\u00a0 \u526a\u5207\uff0c\u6216\u5728\u540c\u76ee\u5f55\u4e0b\u79fb\u52a8\u91cd\u547d\u540d
\n1.\u5982\u679c\u76ee\u6807\u6587\u4ef6\u662f\u6587\u4ef6\u5939\uff0c\u5219\u6e90\u6587\u4ef6\u76f4\u63a5\u79fb\u52a8\u5230\u8be5\u6587\u4ef6\u5939\u5185\uff0c\u540d\u5b57\u8fd8\u662f\u6e90\u6587\u4ef6\u7684\u540d\u5b57\u3002
\n2.\u5982\u679c\u76ee\u6807\u6587\u4ef6\u65f6\u6587\u4ef6\uff0c\u5219\u6e90\u6587\u4ef6\u79fb\u52a8\u7684\u540c\u65f6\u4e5f\u4f1a\u66f4\u6539\u540d\u5b57
\n3.\u5982\u679c\u6e90\u6587\u4ef6\u4e3a\u591a\u4e2a\uff0c\u5219\u76ee\u6807\u5fc5\u987b\u662f\u76ee\u5f55\uff0c\u5e76\u4e14\u7edf\u4e00\u79fb\u52a8\u5230\u76ee\u5f55\u4e0b<\/p>\n
-b\uff1a\u5f53\u76ee\u6807\u6587\u4ef6\u5b58\u5728\u65f6\uff0c\u5148\u8fdb\u884c\u5907\u4efd\u5728\u8986\u76d6<\/p>\n
[root@bogon admin]# mv -b a\/aa b\/\r\nmv: overwrite `b\/aa'? y\r\n[root@bogon admin]# ls b\r\naa aa~ bb<\/pre>\n-f\uff1a\u5f53\u76ee\u6807\u6587\u4ef6\u5b58\u5728\u65f6\uff0c\u5f3a\u5236\u8986\u76d6<\/p>\n
[root@bogon admin]# mv -f a\/aa b\/\r\n[root@bogon admin]# ls b\r\naa bb\r\n<\/pre>\n-i\uff1a\u9ed8\u8ba4\u9009\u9879\uff0c\u5f53\u76ee\u6807\u6587\u4ef6\u5b58\u5728\u65f6\uff0c\u63d0\u793a\u662f\u5426\u8986\u76d6<\/p>\n
[root@bogon admin]# mv -i a\/aa b\/\r\nmv: overwrite `b\/aa'? y\r\n[root@bogon admin]# ls b\r\naa bb\r\n<\/pre>\n-t\uff1a\u5148\u6307\u5b9a\u76ee\u6807\uff0c\u5728\u5236\u5b9a\u6e90<\/p>\n
[root@bogon admin]# mv -t b\/ a\/aa\r\nmv: overwrite `b\/aa'? y\r\n[root@bogon admin]# ls a b\r\na:\r\nbb\r\n \r\nb:\r\naa bb\r\n<\/pre>\n-v\uff1a\u663e\u793a\u8fc7\u7a0b<\/p>\n
[root@bogon admin]# mv -fv a\/aa b\/\r\n`a\/aa' -> `b\/aa'<\/pre>\n\n\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/www.cnblogs.com\/forlive\/p\/8109195.html<\/a><\/p>\n