0

I think this is best explained with an example.

Example:

/mnt/mystorage/source
    => folder1
        => file11.txt
    => folder2
        => file21.txt

/mnt/mystorage/destination
    => folder1
        => file12.txt
    => folder2
        => file22.txt

The resulting file structure in the destination should be:

destination
    => folder1
        => file11.txt
        => file12.txt
    => folder2
        => file21.txt
        => file22.txt

I know I can use rsync with the "--remove-source-files" flag but that would mean it's copying the files/folders first. In my real world example, the source folder is several TBs in size and copying this much will take awhile. From my experience, moving a file/folder to another location in the same partition often means Linux (maybe any OS in general) just changes the file/folder references/pointers.

Thanks

roaima
  • 107,089
  • 14
  • 139
  • 261
mrjayviper
  • 1,971
  • 3
  • 25
  • 41
  • Possible duplicate of [mv with rsync functionality](https://unix.stackexchange.com/questions/152651/mv-with-rsync-functionality) – muru Nov 18 '19 at 03:20
  • Also: https://unix.stackexchange.com/questions/127712/merging-folders-with-mv/ – muru Nov 18 '19 at 03:21
  • And also look at [how-to-integrate-mv-command-after-find-command](https://unix.stackexchange.com/questions/154818/how-to-integrate-mv-command-after-find-command) – doneal24 Nov 18 '19 at 03:26
  • Just move the source folder?! It's almost like a rename. It won't touch any of the content. – JPT Nov 19 '19 at 18:34

0 Answers0