How to copy lots of data fast?

Adam Mateusz Brożyński - Nov 2 '22 - - Dev Community

The best way to copy a lot of data in Linux fast is using tar. It's much faster than cp or copying in any file manager. Here's a simple command with progress bar (pv needs to be installed) that needs to be executed inside a folder that you want to copy recursively:

$ tar cf - . | pv | (cd /destination/path; tar xf -)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .