From mv --help
-n, --no-clobber do not overwrite an existing file
user@pc:~/Desktop/test$ ls -l
total 16
-rw-r--r-- 1 user user 0 ago 6 20:28 bla
-rw-r--r-- 1 user user 0 ago 6 20:28 ble
user@pc:~/Desktop/test$ mv -n bla ble
user@pc:~/Desktop/test$
Is there a way to check the return value of the command mv -n?
Is it possible to do something similar to $? to know if the command succeeded (returned 0) in moving the file or failed (returned 1) because there is already another file with the same name in the target folder?