mv [option]… [-T] source dest
mv [option]… source… directory
mv [option]… -t directory source…
Rename source to dest Or move source(s) to directory.
If source is on a different file system than dest it is copied and then
the original is deleted.
This requires write permission to the source !
--update only when the | source is newer than the
dest.
specifing more than one of | -i, -f, -n, only the final one takes effect.
-i | |||||||||||||||||||||||||||||||||||||
ls -l software/archive total 0 ls -R software software software/ImInSoftware.txt software/IBM/mvs.txt software/cisco/version7.txt mv -v software/* archive software/ImInSoftware.txt is moved software/IBM/mvs.txt not moved; directory IBM does not exist software/cisco/version7.txt not moved; directory cisco does not exist
/Volumes/vacation/2023/scotland > ls -lO† #Display file flags likenochg total 152 -rwxr--r-- 1 nochg dgerman staff 152657 Jun 30 2022 P1180414.JPG > mv P1180414.JPG xyz mv: rename P1180414.JPG to xyz: Operation not permitted mv: fastcopy: open() failed (to): /Users/P1180414.JPG: Permission denied > rm P1180414.JPG override rwxr--r-- dgerman/staff uchg for P1180414.JPG? nochgis set!> mv 00 s132_nrf52 mv: rename 00 to s132_nrf52/00: Permission denied ls -l s132_nrf52 dr-xr--r-- 2 dgerman staff 64 Feb 17 18:35 s132_nrf52/Target directory is not writable.cp: /Users/dgerman/LibraryF/Application Support: unable to copy extended attributes to ./LibraryF/Application Support: Permission denied
When moving to a different volume,mv: /bin/cpmvresorts to copying the files to the destionation. When the copy is completemvremoves thesource, Unless the copy terminated non-zero statussource destinationsource destinationterminated with 1 (non-zero) statusIn this case thesourceis NOT removed!