The GNU Coreutils manual for
-f --force Do not prompt the user before removing a destination file.
However, this already seems to be the default behaviour for
mv, so the
-f option appears to be superfluous. E.g. in GNU Bash version 4.3.11:
$ ls -l total 0 $ touch 1 2; mv -f 1 2; ls 2 $ touch 1 2; mv 1 2; ls 2
It seems unlikely the intention of the
-f flag is to override
alias mv="mv -i", because there are several standard ways of overriding an alias (e.g. using
\mv) that would do this more concisely and in a way that is consistent across commands.
The manual notes that, "If you specify more than one of the -i, -f, -n options, only the final one takes effect," but it still seems unlikely the intention of the
-f flag is to override the
-i flag in general, because equivalent behaviour can be achieved by simply using
mv, which is much more concise and comprehensible than using
That being the case, what is the purpose of the
-f flag? Why does it exist?