Title says it all.
instead of prompting me it just executes the mv
isn't mv built into bash?
I can't think of a way to fix this.
mv -i not working [SOLVED]
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
mv -i not working [SOLVED]
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Some people make happiness wherever they go, others whenever they go.
Re: mv -i not working
Hello, chowse.
I assume that you over-interpret the option
Cf. the output of: Regards,
Karl
I assume that you over-interpret the option
-i ... interactive
. It does not ask before every single move, but only in case a move operation would overwrite an existing file.Cf. the output of:
Code: Select all
mv --help
Usage: mv [OPTION]... [-T] SOURCE DEST
or: mv [OPTION]... SOURCE... DIRECTORY
or: mv [OPTION]... -t DIRECTORY SOURCE...
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Mandatory arguments to long options are mandatory for short options too.
--backup[=CONTROL] make a backup of each existing destination file
-b like --backup but does not accept an argument
-f, --force do not prompt before overwriting
-i, --interactive prompt before overwrite
-n, --no-clobber do not overwrite an existing file
[...]
Karl
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 762 days now.
Lifeline
Re: mv -i not working
Thanks for the reply.
so this is not an overwrite? $ mv -i while.sh WHILE.SH
Could you please give an example?
so this is not an overwrite? $ mv -i while.sh WHILE.SH
Could you please give an example?
Last edited by karlchen on Thu Jan 20, 2022 6:25 pm, edited 1 time in total.
Reason: removed unneeded full quote of the post right above this one
Reason: removed unneeded full quote of the post right above this one
Some people make happiness wherever they go, others whenever they go.
Re: mv -i not working
Linux is case-sensitive, so those are two different files. This would be an over-write:
Code: Select all
mv -i while.sh while.sh
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Your data and OS are backed up....right?
Re: mv -i not working
GOT IT!!
Thanks very much
Thanks very much
Last edited by karlchen on Thu Jan 20, 2022 6:26 pm, edited 1 time in total.
Reason: removed unneeded full quote of the post right above this one
Reason: removed unneeded full quote of the post right above this one
Some people make happiness wherever they go, others whenever they go.