linux命令mv介绍(9)

  • A+
所属分类:Rebuilding

mv命令主要是一个将文件移动到另外一个位置的命令,用于文件移动。
参数:

-f:覆盖文件,且不提示【--force】
-i:提示是否覆盖文件【--interactive】
-n:如果文件存在,则不移动【--no-clobber】
-u:仅当源文件新的时候进行覆盖

-b like --backup but does not accept an argument
--strip-trailing-slashes:remove any trailing slashes from each SOURCE argument
-S, --suffix=SUFFIX
override the usual backup suffix
-t, --target-directory=DIRECTORY
move all SOURCE arguments into DIRECTORY
-T, --no-target-directory
treat DEST as a normal file

--backup[=CONTROL]
make a backup of each existing destination file

none, off
never make backups (even if --backup is given)
numbered, t
make numbered backups
existing, nil
numbered if numbered backups exist, simple otherwise
simple, never
always make simple backups

案例:

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: