From 1650d4dbc7a5559ac49c5daabb6e29f4e574dea4 Mon Sep 17 00:00:00 2001 From: runningwater Date: Sat, 26 Oct 2013 17:32:04 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=9D=E5=AD=98=E4=B8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d Command Line File Copier Inspired By cp.md | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sources/gcp – Advanced Command Line File Copier Inspired By cp.md b/sources/gcp – Advanced Command Line File Copier Inspired By cp.md index c393c45bed..021709b566 100644 --- a/sources/gcp – Advanced Command Line File Copier Inspired By cp.md +++ b/sources/gcp – Advanced Command Line File Copier Inspired By cp.md @@ -1,51 +1,50 @@ -(翻译中......) -gcp – Advanced Command Line File Copier Inspired By cp +gcp – 灵感来自CP的高级命令行文件拷贝工具 ================================================================================ -A few weeks back, we discussed [advanced copy][1] (modified cp command that shows progress bar). A reader dropped in a comment pointing out another utility that also provides basic cp command functionality but along with some advanced features. So, in this article, lets discuss the very same command line utility — **gcp**. +几周前,我们讨论了[高级拷贝][1](修改于cp命令,让其可以显示复制进度条)。一位读者在注释中指出其他实用工具不仅也提供了基本的cp命令功能,而且还提供cp不具有的高级功能。所以,这篇文章里,我们将会讨论非常相似的命令行工具-**gcp**。 -### gcp – Advanced Command Line File Copier ### +### gcp – 高级命令行文件拷贝器 ### -gcp — as the manual suggests — is an advanced command line file copier that is inspired by the standard [cp command][2] but provides various advanced features like progress bar indicator, source lists, continuous copying even if there is a problematic file etc. +gcp — 根据操作手册介绍 — 是一款高级命令行文件拷贝工具软件,其灵感来自于标准的 [cp命令工具][2], 但它提供了像进度条显示、源文件列表、拷贝过程中出现错误文件不中断继续拷贝等cp所不具有的各项高级功能。 -Here is a complete list of options : +下面是完整的选项列表: ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-main.png) -### Testing Environment ### +### 测试环境### -- OS – Ubuntu 13.04 -- Shell – Bash 4.2.45 -- Application – gcp 0.1.3 +- 操作系统 – Ubuntu 13.04 +- Shell工具 – Bash 4.2.45 +- 应用程序 – gcp 0.1.3 -### A Brief Tutorial ### +### 简短的教程 ### -Here are some of the examples of gcp command : +下面是一些gcp命令的例子: -**1. Transfer Progress Indicator** +**1. 复制进度显示** -The gcp command provides transfer progress indicator so that the user is aware of the current status of the copying process. +gcp命令提供了进度显示功能,以便用户能监控到复制操作的时时状态。 -Here is an example : +下面是例子: ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-1.png) -So you can see that the gcp command provides details like complete file size, percentage of copy complete, transfer rate and time left for the copy operation to complete. +所以,你可以看到,gcp命令显示了如文件大小、复制完成的百分比、传输速率和复制操作完成的剩余时间等的所有细节。 -**2. Copy Directories Recursively Through -r Option** +**2. 使用-r选项递归的拷贝目录** -To copy complete directories recursively, use -r option. +要递归拷贝完整的目录,可以使用-r选项。 -Here is an example : +下面是例子: ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-2.png) -So you can see that the gcp command shows the transfer indicator taking in account the complete size of the folder. +所以,你可以看到,gcp命令显示了用来统计所有文件夹大小的复制情况的进度条。 -**3. Elaborate Error Descriptions** +**3. 精心设计的错误描述显示** -In case of any error, the gcp command displays descriptive error messages pinning down the individual culprit file. +任何情况的错误,gcp命令都会把导致拷贝失败的文件的信息显示出来。 -Here is an example : +下面是例子: ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-3.png) @@ -131,4 +130,5 @@ via: http://mylinuxbook.com/gcp-advanced-command-line-file-copier-inspired-by-cp [3]:http://manpages.ubuntu.com/manpages/precise/en/man1/gcp.1.html [4]:http://wiki.goffi.org/wiki/Gcp/en [5]:http://wiki.goffi.org/wiki/Gcp/en -[6]:http://www.hecticgeek.com/2012/03/gcp-command-line-file-copy-ubuntu-linux/ \ No newline at end of file +[6]:http://www.hecticgeek.com/2012/03/gcp-command-line-file-copy-ubuntu-linux/ + From dc91f25916916b872e65077490e8f13be2d1b43a Mon Sep 17 00:00:00 2001 From: runningwater Date: Mon, 28 Oct 2013 11:28:40 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...d Command Line File Copier Inspired By cp.md | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) rename {sources => translated}/gcp – Advanced Command Line File Copier Inspired By cp.md (52%) diff --git a/sources/gcp – Advanced Command Line File Copier Inspired By cp.md b/translated/gcp – Advanced Command Line File Copier Inspired By cp.md similarity index 52% rename from sources/gcp – Advanced Command Line File Copier Inspired By cp.md rename to translated/gcp – Advanced Command Line File Copier Inspired By cp.md index 021709b566..d426189ca4 100644 --- a/sources/gcp – Advanced Command Line File Copier Inspired By cp.md +++ b/translated/gcp – Advanced Command Line File Copier Inspired By cp.md @@ -1,4 +1,4 @@ -gcp – 灵感来自CP的高级命令行文件拷贝工具 +gcp – 源于CP的高级命令行文件拷贝工具 ================================================================================ 几周前,我们讨论了[高级拷贝][1](修改于cp命令,让其可以显示复制进度条)。一位读者在注释中指出其他实用工具不仅也提供了基本的cp命令功能,而且还提供cp不具有的高级功能。所以,这篇文章里,我们将会讨论非常相似的命令行工具-**gcp**。 @@ -42,80 +42,80 @@ gcp命令提供了进度显示功能,以便用户能监控到复制操作的 **3. 精心设计的错误描述显示** -任何情况的错误,gcp命令都会把导致拷贝失败的文件的信息显示出来。 +任何情况的错误,gcp命令都会把拷贝失败的文件的信息显示出来。 下面是例子: ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-3.png) -So you can see that the gcp command provided a detailed error message related to the file **August Rush.avi** that was already present inside the destination folder. But an error did not disrupt the copy of other file(s). +所以,你可以看到,gcp命令列出了详细的错误消息,即关于**August Rush.avi**文件已经在目标目录中存在,拷贝失败。但这个错误并不会影响其它文件的正常拷贝操作。 -**4. Get Detailed Output Through -v Option** +**4. 使用-v选项输出详细信息** -The verbose option -v can be used to keep track of all the details that the gcp command is up to. +详细选项-v参数可以用来跟踪gcp命令执行时的所有详细消息。 -Here is an example : +下面是例子: ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-4.png) -So you can see that extended details were provided in output when -v option was used. +所以,你可以看到,使用-v选项可以输出很多细节信息。 -**5. Create And Use Sources List** +**5. 创建和使用源列表** -One of the shining features of the gcp command is that it lets you create a list of source files that you can use later. +gcp命令的一个很炫的功能就是可以创建源文件列表,以供后期使用。 -For example, I saved the list of source file in the following copy operation using the option **–sources-save**. +例如,在下面的拷贝操作中,我使用**-sources-save**选项来保存一个源文件列表。 ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-5-1.png) -The list name in this case is **SOURCES_SAVE**. You can confirm the saved list through **–sources-list** option. +这例子的列表名叫做**SOURCES_SAVE**。你可以用**–sources-list**选项参数来确认及查看保存的列表。 ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-5-3.png) -So you can see that a list named **SOURCES_SAVE** is saved. +那么你可以看到列表名**SOURCES_SAVE**已经保存上了。 -Now, I deleted the files that I copied in the first step : +现在,删除我们在第一步中拷贝的文件: ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-5-2.png) -and repeated the first step again but without mentioning the source file names. The option **–sources-load** was use to load the source file names from the list **SOURCES_SAVE**. +重复第一步的操作,但不要加上源文件路径名,使用**–sources-load**选项参数来从**SOURCES_SAVE**列表文件中加载源文件路径名。 ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-5-4.png) -So you can see that the gcp command picked up the source file names from the list **SOURCES_SAVE** and the copy process started normally. +所以,你可以看到gcp命令从**SOURCES_SAVE**列表文件中读取源文件路径名,并且正常的执行拷贝操作。 -Here are other options related to source file lists : +下面是关于源文件列表的其它选项参数: ![](http://mylinuxbook.com/wp-content/uploads/2013/10/gcp-5-5.png) -The gcp command provides various other useful options. For complete list of options, read the [man page of gcp][3]. +gcp命令还提供了各式名样的其它有用选项。要查看完整的选项,请阅读[gcp帮助主页][3]。 ### Download/Installation/Configuration ### -Here are some of the important links related to the gcp command : +下面是关于gcp命令的一些主要链接站点: -- [Home Page][4] -- [Download Link][5] -- [Another useful gcp Tutorial][6] +- [主页][4] +- [下载链接][5] +- [另一篇很有用的gcp使用教程][6] -You can alternatively download and install the gcp command through command line package managers like yum, apt-get etc. Ubuntu users can also use Ubuntu software centre to download and install this utility. +你可以通过使用像yum、apt-get等的命令行包管理工具来下载和安装gcp命令。Ubuntu用户也可以使用Ubuntu软件中心来下载和安装这个工具。 -### Pros ### +### 优点 ### -- Status bar and source lists are the USP of this utility. -- Skips the problematic file(s) but the copy operation is not hampered. -- Usage is similar to that of the standard cp command. +- 状态条显示和源文件列表是这个工具的核心。 +- 出现有问题的文件会直接跳过,不会影响正常文件的复制操作。 +- 跟标准的cp命令的用法很相似。 -### Cons ### +### 不足 ### -- While copying folders, it could be better if copy status of each file is displayed. -- Doesn’t come pre-installed in most of the Linux distributions. +- 在复制文件夹的时候,要是能显示每个文件的复制状态,那就更好了。 +- 在大多数Linux发行版本中没有预先安装。 -### Conclusion ### +### 结论 ### -If you are fed up of waiting blindly while copying large files through standard cp command the gcp is a good alternative. System administrators will love the source list feature. It’s a must have utility. +如果你厌倦了通过标准cp命令拷贝大量文件而无休止的等待的话,gcp命令是个不错的选择。系统管理员会喜欢上源文件列表的功能的。它是必备工具。 -**Have you ever used gcp or any other advanced cp-like command line utility? Share your experience with us.** +**你曾经使用过gcp或者类cp的命令行工具吗?可以把你的使用心得跟我们分享。** --------------------------------------------------------------------------------