[root@localhost soft]# touch 1.txt [root@localhost soft]# [root@localhost soft]# ls 1.txt [root@localhost soft]# mv 1.txt 2.txt //重命名文件 [root@localhost soft]# ls 2.txt [root@localhost soft]# [root@localhost soft]# mv 2.txt ../aaa/ //移动文件 [root@localhost soft]# ls [root@localhost soft]# ls ../aaa/ 2.txt
-f 若目标文件或目录与现有的文件或目录重复,则直接覆盖现有的文件或目录
原文:http://www.cnblogs.com/mingerlcm/p/7852686.html