A few weeks ago, we discussed advanced copy (modified to the cp command to display the copy progress bar ). One reader pointed out in the comments that other utility not only provides basic cp command functions, but also provides advanced functions not available in cp. Therefore, in this article, we will discuss a very similar command line tool-gcp.
Gcp-advanced command line file copyer
According to the operation manual, gcp is an advanced command line file copy tool, which is inspired by standard cp commands, however, it provides some advanced functions that cp does not possess, such as progress bar display, source file list, and continuous copy of an error file during the copy process.
Some functions are listed below:
Test Environment
- Operating System-Ubuntu 13.04
- Shell tool-Bash 4.2.45
- Application-gcp 0.1.3
Short tutorial
Below are some examples of gcp commands:
1. Copy progress display
The gcp command displays the progress so that you can monitor the current status of the copy operation.
The following is an example:
As you can see, the gcp command displays details such as the file size, the percentage of copies completed, the transmission rate, and how long the copy operation will take.
2. Use the-r option to recursively copy Directories
To recursively copy the complete directory, you can use the-r option.
Example:
As you can see, the gcp command displays the progress bar of the complete folder copy.
3. Well-designed error description display
In case of an error, the gcp command displays the error message of the file that failed to be copied.
Example:
As you can see, the gcp command lists detailed error messages, that is, the August Rush. avi file already exists in the target directory, and the copy fails. However, this error does not affect the normal copying of other files.
For more details, please continue to read the highlights on the next page:
Recommended reading:
Linux Command cd
Cat for Linux commands
Linux Command alias/unalias
Linux Command Parsing: su root and su-root
Interactive input of Linux commands read
File Processing commands for Linux commands