I suppose I could compare the number of files in the source directory to the number of files in the target directory as cp progresses, or perhaps do it with folder size instead? I tried to find examples, but all bash progress bars seem to be written for copying single files. I want to copy a bunch of files (or a directory, if the former is not possible).
相关问题
- JQ: Select when attribute value exists in a bash a
- bash print whole line after splitting line with if
- “command not found” errors in expect script execut
- grep using grep results
- UNIX Bash - Removing double quotes from specific s
相关文章
- Check if directory exists on remote machine with s
- Reverse four length of letters with sed in unix
- Launch interactive SSH bash session from PHP
- BASH: Basic if then and variable assignment
- Bash script that creates a directory structure
- Test if File/Dir exists over SSH/Sudo in Python/Ba
- How can I create a “tmp” directory with Elastic Be
- Spread 'sed' command over multiple lines
My preferred option is Advanced Copy, as it uses the original
cp
source files.To show a progress bar while doing a recursive copy of files & folders & subfolders (including links and file attributes), you can use
gcp
(easily installed in Ubuntu and Debian by running "sudo apt-get install gcp"):Here is the typical output while copying a large folder of files:
Notice that it shows just one progress bar for the whole operation, whereas if you want a single progress bar per file, you can use
rsync
:To add another option, you can use
cpv
. It usespv
to imitate the usage ofcp
.It works like
pv
but you can use it to recursively copy directoriesYou can get it here
Check the source code for progress_bar in the below git repository of mine
https://github.com/Kiran-Bose/supreme
Also try custom bash script package supreme to verify how progress bar work with cp and mv comands
Functionality overview
(1)Open Apps ----Firefox ----Calculator ----Settings
(2)Manage Files ----Search ----Navigate ----Quick access
(3)Manage Phone ----Move/Copy from phone ----Move/Copy to phone ----Sync folders
(4)Manage USB ----Move/Copy from USB ----Move/Copy to USB