The Correct command is
tar --exclude='**/.*' -cf - . | pv -s $(du -sb ~/test1 | awk '{print $1}') | (cd ~/test2; tar xf -) As @doneals24 posted in a previous comment, the -f
-foption is hethe name of the archive created - therefore you can indicate a dash as the file nameThe --exclude
--excludeoption must follow this format **/.*\*\*/.*for the pattern to be valid