To move a folder within the same PC using rsync
, while showing progress and verbose output, you can use the following command:
rsync -a --info=progress2 --remove-source-files /path/to/source/folder/ /path/to/destination/folder/
-a
: This stands for "archive mode", which preserves permissions, timestamps, symbolic links, and other attributes while copying.--info=progress2
: This option provides detailed progress information for each file.--remove-source-files
: This option deletes the source files after they have been copied. Note that it does not delete directories; you will have to remove the source directory separately if intended.- Ensure to include a trailing slash (
/
) after the source folder path if you want to copy the contents of the folder rather than the folder itself.
After running this command, you might want to remove the now-empty source folder with:
rmdir /path/to/source/folder
Make sure to replace /path/to/source/folder/
and /path/to/destination/folder/
with the actual paths to your source and destination directories.