0

For a /data type folder that has gigabytes and thousands of files and sub folders, I will often do

tar -cf   data.tar    data      {it was a 102gb tar file}

rsync -P data.tar /some_new_location

cd /some_new_location

tar -xf data.tar

the rsync -P I like because it provides the following output during copy of a single file for example

# rsync -P   rhel-8.6-x86_64-dvd.iso   ~
  rhel-8.6-x86_64-dvd.iso                        {it is 11Gb in size}
  1,731,657,728  15%  413.16MB/s    0:00:23

Is there a way to do a cp -rp /data/* /some_new_location/ and get any kind of progress meter or estimated time to completion, rather than play numerous solitaire and freecell waiting for the linux prompt to come back? And same question if using mv.

Kusalananda
  • 333,661
ron
  • 6,575
  • 1
    Most older Unix/Linux applications generally did not output much unless there was a error. Perhaps this explains it better than a comment can. If you need to know status, use rsync or pv. – doneal24 Sep 21 '22 at 17:32
  • 1
    Not to say that when cp-ing you do not actually write on disk. You write in RAM first. cp returns a long time before data is actually commited to disk. See angry comments complaining about kde-plasma progress bar shown when copying a file to some usb device and quickly displaying 100% then staying at 100% for ages before the task actually completes. – MC68020 Sep 21 '22 at 17:42
  • rsync --info=progress2 provides a good progress view of the copying progress, but as described in the previous comment, you need some other method/tool to view the progress of flushing the buffers in RAM. This link and links from it are addressing that issue. – sudodus Sep 21 '22 at 19:22

0 Answers0