From 2053024070ca0a1acb7d2e9ed989b47056318f17 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Tue, 20 Sep 2016 00:56:13 +0800 Subject: [PATCH 01/17] Update 20160914 How to Speed Up LibreOffice with 4 Simple Steps.md --- ...peed Up LibreOffice with 4 Simple Steps.md | 70 ++++++++++--------- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md b/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md index 7dc5ea0424..a97e239c6d 100644 --- a/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md +++ b/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md @@ -1,83 +1,85 @@ -translating by ucasFL -How to Speed Up LibreOffice with 4 Simple Steps + +如何用四个简单的步骤加速 Libreoffice ==== ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-featured-2.jpg) -For many fans and supporters of Open Source software, LibreOffice is the best alternative to Microsoft Office, and it has definitely seen huge improvements over the last few releases. However, the initial startup experience still leaves a lot to be desired. There are ways to improve launch time and overall performance of LibreOffice. -I will go over some practical steps that you can take to improve the load time and responsiveness of LibreOffice in the paragraphs below. +对于许多许多开源软件的粉丝和支持者来说,Libreoffice 是 Microsoft Office 最好的替代品,在过去的一些发行版中可以看到它明显有了巨大的改进。然而,开始启动依然有许多经验需要掌握。有一些方法可以缩短 Libreoffice 的启动时间并改善它的所有性能。 -### 1. Increase Memory Per Object and Image Cache +在下面的段落里,我将会展示一些实用性的步骤,你可以通过它们来改善 Libreoffice 的加载时间和响应能力。 -This will help the program load faster by allocating more memory resources to the image cache and objects. +### 1. 增加每个对象和图像缓存的存储空间 -1. Launch LibreOffice Writer (or Calc) +这将可以通过分配更多的内存资源给图像缓存和对象来加快程序的加载时间。 -2. Navigate to “Tools -> Options” in the menubar or use the keyboard shortcut “Alt + F12.” +1. 启动 Libreoffice Writer (或者 Calc) -3. Click “Memory” under LibreOffice and increase “Use for LibreOffice” to 128MB. +2. 点击菜单栏上的 “工具 -> 选择” 或者按键盘上的快捷键“Alt + F12.” -4. Also increase “Memory per object” to 20Mb. +3. 点击 Libreoffice 下面的“内存”然后增加“Libreoffice使用”到128MB -5. Click “Ok” to save your changes. +4. 同样的增加“每个对象的内存”到20MB。 +5. 点击确定来保存你的修改。 ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-step-1.png) -Note: You can set the numbers higher or lower than the suggested values depending on how powerful your machine is. It is best to experiment and see which value gives you the optimum performance. -### 2. Enable LibreOffice QuickStarter +注意:你可以根据自己机器的性能把数值设置得比建议值的高一些或低一些。最好通过亲自体验来看看什么值能够让机器达到最佳性能。 -If you have a generous amount of RAM on your machine, say 4GB and above, you can enable the “Systray Quickstarter” option to keep part of LibreOffice in memory for quicker response with opening new documents. +### 2.启用 Libreoffice 的快速启动 +如果你的机器上有足够大的 RAM(随机存取存储器),比如 4GB 或者更大,你可以启用“系统托盘快速启动”,从而让内存中的部分 Libreoffice 在打开新文件时能够快速反应。 You will definitely see improved performance in opening new documents after enabling this option. - +在启用这个选择以后,你会清楚的看到在打开新文件时它的性能有了很大的提高。 1. Open the options dialog by navigating to “Tools -> Options.” - +1.通过点击“工具 -> 选择”来打开选择对话框 2. In the sidebar under “LibreOffice”, select “Memory.” - +2. 在 “Libreoffice” 下面的侧边栏选择“内存。” 3. Tick the “Enable Systray Quickstarter” checkbox. - +3. 勾选“系统托盘快速启动”复选框。 4. Click “OK” to save the changes. - +4. 点击“确定”来保存修改。 ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-2.png) Once this option is enabled, you will see the LibreOffice icon in your system tray with options to open any type of document. - +一旦这个选项启用以后,你将会在你的系统托盘看到 Libreoffice 图标,可以选择来打开任何类型的文件。 ### 3. Disable Java Runtime - +### 3. 关闭 Java 运行环境 Another easy way to speed up the launch time and responsiveness of LibreOffice is to disable Java. - +另一个加快 Libreoffice 加载时间和响应能力的简单方法是关闭 Java。 1. Open the Options dialog using “Alt + F12.” - +1. 通过“Alt + F12”打开选择对话框 2. In the sidebar, select “LibreOffice,” then “Advanced.” - +2. 在侧边栏里,选择“Libreoffice”, 然后选择“高级”。 3. Uncheck the “Use Java runtime environment” option. - +3. 取消勾选“使用 Java 运行环境”选项。 4. Click “OK” to close the dialog. - +4. 点击“确定”来关闭对话框。 ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-3.png) If all you use is Writer and Calc, disabling Java will not stop you from working with your files as normal. But to use LibreOffice Base and some other special features, you may need to re-enable it again. In that case, you will get a popup asking if you wish to turn it back on. - +如果你只使用 Writer 和 Calc,那么关闭 Java 不会影响你正常使用,但如果你需要使用 Libreoffice Base 和一些其他的特性,那么你可能需要重新启用它。在那种情况,将会弹出一个框询问你是否希望再次打开它。 ### 4. Reduce Number of Undo Steps - +### 4. 减少使用撤销步骤 By default, LibreOffice allows you to undo up to 100 changes to a document. Most users do not need anywhere near that, so holding that many steps in memory is largely a waste of resources. - +默认情况下,Libreoffice 允许你最多撤销一个文件的 100 个改变。绝大多数用户不需要靠近那儿任何地方(使用撤销操作),所以多次使用撤销步骤是对内存资源的巨大浪费。 I recommend that you reduce this number to 20 to free up memory for other things, but feel free to customise this part to suit your needs. - +我建议减少撤销步骤到 20 次以下来为其他东西释放内存,但是这部分可以自由选择来满足你的需求。 1. Open the options dialog by navigating to “Tools -> Options.” - +1. 通过点击 “工具 -> 选择”来打开选择对话框。 2. In the sidebar under “LibreOffice,” select “Memory.” - +2. 在 “Libreoffice” 下面的侧边栏,选择“内存”。 3. Under “Undo” and change the number of steps to your preferred value. - +3. 在“撤销”下面把步骤数目改成最适合你的值。 4. Click “OK” to save the changes. - +4. 点击“确定”来保存修改。 ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-5.png) If the tips provided helped you speed up the launch time of your LibreOffice Suite, let us know in the comments. Also, please share any other tips you may know for others to benefit as well. +如果你这些技巧为加速你的 Libreoffice 套件的加载时间提供了帮助,请在评论里告诉我们。同样,请分享你知道的任何其他技巧来给其他人带来帮助。 + -------------------------------------------------------------------------------- From d04b0479a3b1c9d37462b87749ff188f82d32cc6 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Tue, 20 Sep 2016 12:35:03 +0800 Subject: [PATCH 02/17] Update 20160914 How to Speed Up LibreOffice with 4 Simple Steps.md --- ...peed Up LibreOffice with 4 Simple Steps.md | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md b/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md index a97e239c6d..e488c0c743 100644 --- a/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md +++ b/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md @@ -31,53 +31,53 @@ ### 2.启用 Libreoffice 的快速启动 如果你的机器上有足够大的 RAM(随机存取存储器),比如 4GB 或者更大,你可以启用“系统托盘快速启动”,从而让内存中的部分 Libreoffice 在打开新文件时能够快速反应。 -You will definitely see improved performance in opening new documents after enabling this option. + 在启用这个选择以后,你会清楚的看到在打开新文件时它的性能有了很大的提高。 -1. Open the options dialog by navigating to “Tools -> Options.” + 1.通过点击“工具 -> 选择”来打开选择对话框 -2. In the sidebar under “LibreOffice”, select “Memory.” + 2. 在 “Libreoffice” 下面的侧边栏选择“内存。” -3. Tick the “Enable Systray Quickstarter” checkbox. + 3. 勾选“系统托盘快速启动”复选框。 -4. Click “OK” to save the changes. + 4. 点击“确定”来保存修改。 ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-2.png) -Once this option is enabled, you will see the LibreOffice icon in your system tray with options to open any type of document. + 一旦这个选项启用以后,你将会在你的系统托盘看到 Libreoffice 图标,可以选择来打开任何类型的文件。 -### 3. Disable Java Runtime + ### 3. 关闭 Java 运行环境 -Another easy way to speed up the launch time and responsiveness of LibreOffice is to disable Java. + 另一个加快 Libreoffice 加载时间和响应能力的简单方法是关闭 Java。 -1. Open the Options dialog using “Alt + F12.” -1. 通过“Alt + F12”打开选择对话框 -2. In the sidebar, select “LibreOffice,” then “Advanced.” + +1. 同时按下“Alt + F12”打开选择对话框 + 2. 在侧边栏里,选择“Libreoffice”, 然后选择“高级”。 -3. Uncheck the “Use Java runtime environment” option. + 3. 取消勾选“使用 Java 运行环境”选项。 -4. Click “OK” to close the dialog. + 4. 点击“确定”来关闭对话框。 ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-3.png) -If all you use is Writer and Calc, disabling Java will not stop you from working with your files as normal. But to use LibreOffice Base and some other special features, you may need to re-enable it again. In that case, you will get a popup asking if you wish to turn it back on. + 如果你只使用 Writer 和 Calc,那么关闭 Java 不会影响你正常使用,但如果你需要使用 Libreoffice Base 和一些其他的特性,那么你可能需要重新启用它。在那种情况,将会弹出一个框询问你是否希望再次打开它。 -### 4. Reduce Number of Undo Steps + ### 4. 减少使用撤销步骤 -By default, LibreOffice allows you to undo up to 100 changes to a document. Most users do not need anywhere near that, so holding that many steps in memory is largely a waste of resources. + 默认情况下,Libreoffice 允许你最多撤销一个文件的 100 个改变。绝大多数用户不需要靠近那儿任何地方(使用撤销操作),所以多次使用撤销步骤是对内存资源的巨大浪费。 -I recommend that you reduce this number to 20 to free up memory for other things, but feel free to customise this part to suit your needs. + 我建议减少撤销步骤到 20 次以下来为其他东西释放内存,但是这部分可以自由选择来满足你的需求。 -1. Open the options dialog by navigating to “Tools -> Options.” + 1. 通过点击 “工具 -> 选择”来打开选择对话框。 -2. In the sidebar under “LibreOffice,” select “Memory.” + 2. 在 “Libreoffice” 下面的侧边栏,选择“内存”。 -3. Under “Undo” and change the number of steps to your preferred value. + 3. 在“撤销”下面把步骤数目改成最适合你的值。 -4. Click “OK” to save the changes. + 4. 点击“确定”来保存修改。 ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-5.png) -If the tips provided helped you speed up the launch time of your LibreOffice Suite, let us know in the comments. Also, please share any other tips you may know for others to benefit as well. + 如果你这些技巧为加速你的 Libreoffice 套件的加载时间提供了帮助,请在评论里告诉我们。同样,请分享你知道的任何其他技巧来给其他人带来帮助。 @@ -86,7 +86,7 @@ If the tips provided helped you speed up the launch time of your LibreOffice Sui via: https://www.maketecheasier.com/speed-up-libreoffice/?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+maketecheasier 作者:[Ayo Isaiah][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ucasFL](https://github.com/ucasFL) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 04ba694172cb7198097c6c1d97547039c7a20533 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Tue, 20 Sep 2016 12:37:17 +0800 Subject: [PATCH 03/17] Update 20160914 How to Speed Up LibreOffice with 4 Simple Steps.md --- ...peed Up LibreOffice with 4 Simple Steps.md | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md b/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md index e488c0c743..02ec0fd63c 100644 --- a/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md +++ b/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md @@ -1,24 +1,24 @@ -如何用四个简单的步骤加速 Libreoffice +如何用四个简单的步骤加速 LibreOffice ==== ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-featured-2.jpg) -对于许多许多开源软件的粉丝和支持者来说,Libreoffice 是 Microsoft Office 最好的替代品,在过去的一些发行版中可以看到它明显有了巨大的改进。然而,开始启动依然有许多经验需要掌握。有一些方法可以缩短 Libreoffice 的启动时间并改善它的所有性能。 +对于许多许多开源软件的粉丝和支持者来说,LibreOffice 是 Microsoft Office 最好的替代品,在过去的一些发行版中可以看到它明显有了巨大的改进。然而,开始启动依然有许多经验需要掌握。有一些方法可以缩短 LibreOffice 的启动时间并改善它的所有性能。 -在下面的段落里,我将会展示一些实用性的步骤,你可以通过它们来改善 Libreoffice 的加载时间和响应能力。 +在下面的段落里,我将会展示一些实用性的步骤,你可以通过它们来改善 LibreOffice 的加载时间和响应能力。 ### 1. 增加每个对象和图像缓存的存储空间 这将可以通过分配更多的内存资源给图像缓存和对象来加快程序的加载时间。 -1. 启动 Libreoffice Writer (或者 Calc) +1. 启动 LibreOffice Writer (或者 Calc) 2. 点击菜单栏上的 “工具 -> 选择” 或者按键盘上的快捷键“Alt + F12.” -3. 点击 Libreoffice 下面的“内存”然后增加“Libreoffice使用”到128MB +3. 点击 LibreOffice 下面的“内存”然后增加“LibreOffice使用”到128MB 4. 同样的增加“每个对象的内存”到20MB。 @@ -28,15 +28,15 @@ 注意:你可以根据自己机器的性能把数值设置得比建议值的高一些或低一些。最好通过亲自体验来看看什么值能够让机器达到最佳性能。 -### 2.启用 Libreoffice 的快速启动 +### 2.启用 LibreOffice 的快速启动 -如果你的机器上有足够大的 RAM(随机存取存储器),比如 4GB 或者更大,你可以启用“系统托盘快速启动”,从而让内存中的部分 Libreoffice 在打开新文件时能够快速反应。 +如果你的机器上有足够大的 RAM(随机存取存储器),比如 4GB 或者更大,你可以启用“系统托盘快速启动”,从而让内存中的部分 LibreOffice 在打开新文件时能够快速反应。 在启用这个选择以后,你会清楚的看到在打开新文件时它的性能有了很大的提高。 1.通过点击“工具 -> 选择”来打开选择对话框 -2. 在 “Libreoffice” 下面的侧边栏选择“内存。” +2. 在 “LibreOffice” 下面的侧边栏选择“内存。” 3. 勾选“系统托盘快速启动”复选框。 @@ -44,11 +44,11 @@ ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-2.png) -一旦这个选项启用以后,你将会在你的系统托盘看到 Libreoffice 图标,可以选择来打开任何类型的文件。 +一旦这个选项启用以后,你将会在你的系统托盘看到 LibreOffice 图标,可以选择来打开任何类型的文件。 ### 3. 关闭 Java 运行环境 -另一个加快 Libreoffice 加载时间和响应能力的简单方法是关闭 Java。 +另一个加快 LibreOffice 加载时间和响应能力的简单方法是关闭 Java。 1. 同时按下“Alt + F12”打开选择对话框 @@ -60,17 +60,17 @@ ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-3.png) -如果你只使用 Writer 和 Calc,那么关闭 Java 不会影响你正常使用,但如果你需要使用 Libreoffice Base 和一些其他的特性,那么你可能需要重新启用它。在那种情况,将会弹出一个框询问你是否希望再次打开它。 +如果你只使用 Writer 和 Calc,那么关闭 Java 不会影响你正常使用,但如果你需要使用 LibreOffice Base 和一些其他的特性,那么你可能需要重新启用它。在那种情况,将会弹出一个框询问你是否希望再次打开它。 ### 4. 减少使用撤销步骤 -默认情况下,Libreoffice 允许你最多撤销一个文件的 100 个改变。绝大多数用户不需要靠近那儿任何地方(使用撤销操作),所以多次使用撤销步骤是对内存资源的巨大浪费。 +默认情况下,LibreOffice 允许你最多撤销一个文件的 100 个改变。绝大多数用户不需要靠近那儿任何地方(使用撤销操作),所以多次使用撤销步骤是对内存资源的巨大浪费。 我建议减少撤销步骤到 20 次以下来为其他东西释放内存,但是这部分可以自由选择来满足你的需求。 1. 通过点击 “工具 -> 选择”来打开选择对话框。 -2. 在 “Libreoffice” 下面的侧边栏,选择“内存”。 +2. 在 “LibreOffice” 下面的侧边栏,选择“内存”。 3. 在“撤销”下面把步骤数目改成最适合你的值。 @@ -78,7 +78,7 @@ ![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-5.png) -如果你这些技巧为加速你的 Libreoffice 套件的加载时间提供了帮助,请在评论里告诉我们。同样,请分享你知道的任何其他技巧来给其他人带来帮助。 +如果你这些技巧为加速你的 LibreOffice 套件的加载时间提供了帮助,请在评论里告诉我们。同样,请分享你知道的任何其他技巧来给其他人带来帮助。 -------------------------------------------------------------------------------- From 6937a22df6badd4ca83f71fe434d6dc75ecb9b06 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Tue, 20 Sep 2016 12:40:35 +0800 Subject: [PATCH 04/17] =?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 --- ...peed Up LibreOffice with 4 Simple Steps.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 translated/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md diff --git a/translated/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md b/translated/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md new file mode 100644 index 0000000000..02ec0fd63c --- /dev/null +++ b/translated/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md @@ -0,0 +1,94 @@ + + +如何用四个简单的步骤加速 LibreOffice +==== + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-featured-2.jpg) + + +对于许多许多开源软件的粉丝和支持者来说,LibreOffice 是 Microsoft Office 最好的替代品,在过去的一些发行版中可以看到它明显有了巨大的改进。然而,开始启动依然有许多经验需要掌握。有一些方法可以缩短 LibreOffice 的启动时间并改善它的所有性能。 + +在下面的段落里,我将会展示一些实用性的步骤,你可以通过它们来改善 LibreOffice 的加载时间和响应能力。 + +### 1. 增加每个对象和图像缓存的存储空间 + +这将可以通过分配更多的内存资源给图像缓存和对象来加快程序的加载时间。 + +1. 启动 LibreOffice Writer (或者 Calc) + +2. 点击菜单栏上的 “工具 -> 选择” 或者按键盘上的快捷键“Alt + F12.” + +3. 点击 LibreOffice 下面的“内存”然后增加“LibreOffice使用”到128MB + +4. 同样的增加“每个对象的内存”到20MB。 + +5. 点击确定来保存你的修改。 +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-step-1.png) + + +注意:你可以根据自己机器的性能把数值设置得比建议值的高一些或低一些。最好通过亲自体验来看看什么值能够让机器达到最佳性能。 + +### 2.启用 LibreOffice 的快速启动 + +如果你的机器上有足够大的 RAM(随机存取存储器),比如 4GB 或者更大,你可以启用“系统托盘快速启动”,从而让内存中的部分 LibreOffice 在打开新文件时能够快速反应。 + +在启用这个选择以后,你会清楚的看到在打开新文件时它的性能有了很大的提高。 + +1.通过点击“工具 -> 选择”来打开选择对话框 + +2. 在 “LibreOffice” 下面的侧边栏选择“内存。” + +3. 勾选“系统托盘快速启动”复选框。 + +4. 点击“确定”来保存修改。 +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-2.png) + + +一旦这个选项启用以后,你将会在你的系统托盘看到 LibreOffice 图标,可以选择来打开任何类型的文件。 + +### 3. 关闭 Java 运行环境 + +另一个加快 LibreOffice 加载时间和响应能力的简单方法是关闭 Java。 + +1. 同时按下“Alt + F12”打开选择对话框 + +2. 在侧边栏里,选择“Libreoffice”, 然后选择“高级”。 + +3. 取消勾选“使用 Java 运行环境”选项。 + +4. 点击“确定”来关闭对话框。 +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-3.png) + + +如果你只使用 Writer 和 Calc,那么关闭 Java 不会影响你正常使用,但如果你需要使用 LibreOffice Base 和一些其他的特性,那么你可能需要重新启用它。在那种情况,将会弹出一个框询问你是否希望再次打开它。 + +### 4. 减少使用撤销步骤 + +默认情况下,LibreOffice 允许你最多撤销一个文件的 100 个改变。绝大多数用户不需要靠近那儿任何地方(使用撤销操作),所以多次使用撤销步骤是对内存资源的巨大浪费。 + +我建议减少撤销步骤到 20 次以下来为其他东西释放内存,但是这部分可以自由选择来满足你的需求。 + +1. 通过点击 “工具 -> 选择”来打开选择对话框。 + +2. 在 “LibreOffice” 下面的侧边栏,选择“内存”。 + +3. 在“撤销”下面把步骤数目改成最适合你的值。 + +4. 点击“确定”来保存修改。 +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-5.png) + + +如果你这些技巧为加速你的 LibreOffice 套件的加载时间提供了帮助,请在评论里告诉我们。同样,请分享你知道的任何其他技巧来给其他人带来帮助。 + + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/speed-up-libreoffice/?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+maketecheasier + +作者:[Ayo Isaiah][a] +译者:[ucasFL](https://github.com/ucasFL) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.maketecheasier.com/author/ayoisaiah/ From 8330a2853e764a88b6ea6c75eac54d5041bcb416 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Tue, 20 Sep 2016 12:41:13 +0800 Subject: [PATCH 05/17] Delete 20160914 How to Speed Up LibreOffice with 4 Simple Steps.md --- ...peed Up LibreOffice with 4 Simple Steps.md | 94 ------------------- 1 file changed, 94 deletions(-) delete mode 100644 sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md diff --git a/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md b/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md deleted file mode 100644 index 02ec0fd63c..0000000000 --- a/sources/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md +++ /dev/null @@ -1,94 +0,0 @@ - - -如何用四个简单的步骤加速 LibreOffice -==== - -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-featured-2.jpg) - - -对于许多许多开源软件的粉丝和支持者来说,LibreOffice 是 Microsoft Office 最好的替代品,在过去的一些发行版中可以看到它明显有了巨大的改进。然而,开始启动依然有许多经验需要掌握。有一些方法可以缩短 LibreOffice 的启动时间并改善它的所有性能。 - -在下面的段落里,我将会展示一些实用性的步骤,你可以通过它们来改善 LibreOffice 的加载时间和响应能力。 - -### 1. 增加每个对象和图像缓存的存储空间 - -这将可以通过分配更多的内存资源给图像缓存和对象来加快程序的加载时间。 - -1. 启动 LibreOffice Writer (或者 Calc) - -2. 点击菜单栏上的 “工具 -> 选择” 或者按键盘上的快捷键“Alt + F12.” - -3. 点击 LibreOffice 下面的“内存”然后增加“LibreOffice使用”到128MB - -4. 同样的增加“每个对象的内存”到20MB。 - -5. 点击确定来保存你的修改。 -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-step-1.png) - - -注意:你可以根据自己机器的性能把数值设置得比建议值的高一些或低一些。最好通过亲自体验来看看什么值能够让机器达到最佳性能。 - -### 2.启用 LibreOffice 的快速启动 - -如果你的机器上有足够大的 RAM(随机存取存储器),比如 4GB 或者更大,你可以启用“系统托盘快速启动”,从而让内存中的部分 LibreOffice 在打开新文件时能够快速反应。 - -在启用这个选择以后,你会清楚的看到在打开新文件时它的性能有了很大的提高。 - -1.通过点击“工具 -> 选择”来打开选择对话框 - -2. 在 “LibreOffice” 下面的侧边栏选择“内存。” - -3. 勾选“系统托盘快速启动”复选框。 - -4. 点击“确定”来保存修改。 -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-2.png) - - -一旦这个选项启用以后,你将会在你的系统托盘看到 LibreOffice 图标,可以选择来打开任何类型的文件。 - -### 3. 关闭 Java 运行环境 - -另一个加快 LibreOffice 加载时间和响应能力的简单方法是关闭 Java。 - -1. 同时按下“Alt + F12”打开选择对话框 - -2. 在侧边栏里,选择“Libreoffice”, 然后选择“高级”。 - -3. 取消勾选“使用 Java 运行环境”选项。 - -4. 点击“确定”来关闭对话框。 -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-3.png) - - -如果你只使用 Writer 和 Calc,那么关闭 Java 不会影响你正常使用,但如果你需要使用 LibreOffice Base 和一些其他的特性,那么你可能需要重新启用它。在那种情况,将会弹出一个框询问你是否希望再次打开它。 - -### 4. 减少使用撤销步骤 - -默认情况下,LibreOffice 允许你最多撤销一个文件的 100 个改变。绝大多数用户不需要靠近那儿任何地方(使用撤销操作),所以多次使用撤销步骤是对内存资源的巨大浪费。 - -我建议减少撤销步骤到 20 次以下来为其他东西释放内存,但是这部分可以自由选择来满足你的需求。 - -1. 通过点击 “工具 -> 选择”来打开选择对话框。 - -2. 在 “LibreOffice” 下面的侧边栏,选择“内存”。 - -3. 在“撤销”下面把步骤数目改成最适合你的值。 - -4. 点击“确定”来保存修改。 -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-5.png) - - -如果你这些技巧为加速你的 LibreOffice 套件的加载时间提供了帮助,请在评论里告诉我们。同样,请分享你知道的任何其他技巧来给其他人带来帮助。 - - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/speed-up-libreoffice/?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+maketecheasier - -作者:[Ayo Isaiah][a] -译者:[ucasFL](https://github.com/ucasFL) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.maketecheasier.com/author/ayoisaiah/ From 692a8ef00d900412f4fbc0236c6c21421515bb52 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Tue, 20 Sep 2016 12:43:08 +0800 Subject: [PATCH 06/17] =?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 --- ...How to Speed Up LibreOffice with 4 Simple Steps.md | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 translated/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md diff --git a/translated/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md b/translated/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md new file mode 100644 index 0000000000..02ec0fd63c --- /dev/null +++ b/translated/tech/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md @@ -0,0 +1,94 @@ + + +如何用四个简单的步骤加速 LibreOffice +==== + +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-featured-2.jpg) + + +对于许多许多开源软件的粉丝和支持者来说,LibreOffice 是 Microsoft Office 最好的替代品,在过去的一些发行版中可以看到它明显有了巨大的改进。然而,开始启动依然有许多经验需要掌握。有一些方法可以缩短 LibreOffice 的启动时间并改善它的所有性能。 + +在下面的段落里,我将会展示一些实用性的步骤,你可以通过它们来改善 LibreOffice 的加载时间和响应能力。 + +### 1. 增加每个对象和图像缓存的存储空间 + +这将可以通过分配更多的内存资源给图像缓存和对象来加快程序的加载时间。 + +1. 启动 LibreOffice Writer (或者 Calc) + +2. 点击菜单栏上的 “工具 -> 选择” 或者按键盘上的快捷键“Alt + F12.” + +3. 点击 LibreOffice 下面的“内存”然后增加“LibreOffice使用”到128MB + +4. 同样的增加“每个对象的内存”到20MB。 + +5. 点击确定来保存你的修改。 +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-step-1.png) + + +注意:你可以根据自己机器的性能把数值设置得比建议值的高一些或低一些。最好通过亲自体验来看看什么值能够让机器达到最佳性能。 + +### 2.启用 LibreOffice 的快速启动 + +如果你的机器上有足够大的 RAM(随机存取存储器),比如 4GB 或者更大,你可以启用“系统托盘快速启动”,从而让内存中的部分 LibreOffice 在打开新文件时能够快速反应。 + +在启用这个选择以后,你会清楚的看到在打开新文件时它的性能有了很大的提高。 + +1.通过点击“工具 -> 选择”来打开选择对话框 + +2. 在 “LibreOffice” 下面的侧边栏选择“内存。” + +3. 勾选“系统托盘快速启动”复选框。 + +4. 点击“确定”来保存修改。 +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-2.png) + + +一旦这个选项启用以后,你将会在你的系统托盘看到 LibreOffice 图标,可以选择来打开任何类型的文件。 + +### 3. 关闭 Java 运行环境 + +另一个加快 LibreOffice 加载时间和响应能力的简单方法是关闭 Java。 + +1. 同时按下“Alt + F12”打开选择对话框 + +2. 在侧边栏里,选择“Libreoffice”, 然后选择“高级”。 + +3. 取消勾选“使用 Java 运行环境”选项。 + +4. 点击“确定”来关闭对话框。 +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-3.png) + + +如果你只使用 Writer 和 Calc,那么关闭 Java 不会影响你正常使用,但如果你需要使用 LibreOffice Base 和一些其他的特性,那么你可能需要重新启用它。在那种情况,将会弹出一个框询问你是否希望再次打开它。 + +### 4. 减少使用撤销步骤 + +默认情况下,LibreOffice 允许你最多撤销一个文件的 100 个改变。绝大多数用户不需要靠近那儿任何地方(使用撤销操作),所以多次使用撤销步骤是对内存资源的巨大浪费。 + +我建议减少撤销步骤到 20 次以下来为其他东西释放内存,但是这部分可以自由选择来满足你的需求。 + +1. 通过点击 “工具 -> 选择”来打开选择对话框。 + +2. 在 “LibreOffice” 下面的侧边栏,选择“内存”。 + +3. 在“撤销”下面把步骤数目改成最适合你的值。 + +4. 点击“确定”来保存修改。 +![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-5.png) + + +如果你这些技巧为加速你的 LibreOffice 套件的加载时间提供了帮助,请在评论里告诉我们。同样,请分享你知道的任何其他技巧来给其他人带来帮助。 + + +-------------------------------------------------------------------------------- + +via: https://www.maketecheasier.com/speed-up-libreoffice/?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+maketecheasier + +作者:[Ayo Isaiah][a] +译者:[ucasFL](https://github.com/ucasFL) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://www.maketecheasier.com/author/ayoisaiah/ From a97b223af58a1d2bd340ca98bce5139524e5ab28 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Tue, 20 Sep 2016 12:44:31 +0800 Subject: [PATCH 07/17] Delete 20160914 How to Speed Up LibreOffice with 4 Simple Steps.md --- ...peed Up LibreOffice with 4 Simple Steps.md | 94 ------------------- 1 file changed, 94 deletions(-) delete mode 100644 translated/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md diff --git a/translated/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md b/translated/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md deleted file mode 100644 index 02ec0fd63c..0000000000 --- a/translated/20160914 How to Speed Up LibreOffice with 4 Simple Steps.md +++ /dev/null @@ -1,94 +0,0 @@ - - -如何用四个简单的步骤加速 LibreOffice -==== - -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-featured-2.jpg) - - -对于许多许多开源软件的粉丝和支持者来说,LibreOffice 是 Microsoft Office 最好的替代品,在过去的一些发行版中可以看到它明显有了巨大的改进。然而,开始启动依然有许多经验需要掌握。有一些方法可以缩短 LibreOffice 的启动时间并改善它的所有性能。 - -在下面的段落里,我将会展示一些实用性的步骤,你可以通过它们来改善 LibreOffice 的加载时间和响应能力。 - -### 1. 增加每个对象和图像缓存的存储空间 - -这将可以通过分配更多的内存资源给图像缓存和对象来加快程序的加载时间。 - -1. 启动 LibreOffice Writer (或者 Calc) - -2. 点击菜单栏上的 “工具 -> 选择” 或者按键盘上的快捷键“Alt + F12.” - -3. 点击 LibreOffice 下面的“内存”然后增加“LibreOffice使用”到128MB - -4. 同样的增加“每个对象的内存”到20MB。 - -5. 点击确定来保存你的修改。 -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-step-1.png) - - -注意:你可以根据自己机器的性能把数值设置得比建议值的高一些或低一些。最好通过亲自体验来看看什么值能够让机器达到最佳性能。 - -### 2.启用 LibreOffice 的快速启动 - -如果你的机器上有足够大的 RAM(随机存取存储器),比如 4GB 或者更大,你可以启用“系统托盘快速启动”,从而让内存中的部分 LibreOffice 在打开新文件时能够快速反应。 - -在启用这个选择以后,你会清楚的看到在打开新文件时它的性能有了很大的提高。 - -1.通过点击“工具 -> 选择”来打开选择对话框 - -2. 在 “LibreOffice” 下面的侧边栏选择“内存。” - -3. 勾选“系统托盘快速启动”复选框。 - -4. 点击“确定”来保存修改。 -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-2.png) - - -一旦这个选项启用以后,你将会在你的系统托盘看到 LibreOffice 图标,可以选择来打开任何类型的文件。 - -### 3. 关闭 Java 运行环境 - -另一个加快 LibreOffice 加载时间和响应能力的简单方法是关闭 Java。 - -1. 同时按下“Alt + F12”打开选择对话框 - -2. 在侧边栏里,选择“Libreoffice”, 然后选择“高级”。 - -3. 取消勾选“使用 Java 运行环境”选项。 - -4. 点击“确定”来关闭对话框。 -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-3.png) - - -如果你只使用 Writer 和 Calc,那么关闭 Java 不会影响你正常使用,但如果你需要使用 LibreOffice Base 和一些其他的特性,那么你可能需要重新启用它。在那种情况,将会弹出一个框询问你是否希望再次打开它。 - -### 4. 减少使用撤销步骤 - -默认情况下,LibreOffice 允许你最多撤销一个文件的 100 个改变。绝大多数用户不需要靠近那儿任何地方(使用撤销操作),所以多次使用撤销步骤是对内存资源的巨大浪费。 - -我建议减少撤销步骤到 20 次以下来为其他东西释放内存,但是这部分可以自由选择来满足你的需求。 - -1. 通过点击 “工具 -> 选择”来打开选择对话框。 - -2. 在 “LibreOffice” 下面的侧边栏,选择“内存”。 - -3. 在“撤销”下面把步骤数目改成最适合你的值。 - -4. 点击“确定”来保存修改。 -![](https://maketecheasier-2d0f.kxcdn.com/assets/uploads/2016/08/speed-up-libreoffice-5.png) - - -如果你这些技巧为加速你的 LibreOffice 套件的加载时间提供了帮助,请在评论里告诉我们。同样,请分享你知道的任何其他技巧来给其他人带来帮助。 - - --------------------------------------------------------------------------------- - -via: https://www.maketecheasier.com/speed-up-libreoffice/?utm_medium=feed&utm_source=feedpress.me&utm_campaign=Feed%3A+maketecheasier - -作者:[Ayo Isaiah][a] -译者:[ucasFL](https://github.com/ucasFL) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://www.maketecheasier.com/author/ayoisaiah/ From 14ca3e7baecdd1eece7d46ff9e958ad4c61e33b0 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Wed, 21 Sep 2016 18:25:40 +0800 Subject: [PATCH 08/17] Update 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...ifications of Shell Commands and Their Usage in Linux.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md index c9b4836f4c..d0e168f3ff 100644 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -1,11 +1,11 @@ translating by ucasFL Understanding Different Classifications of Shell Commands and Their Usage in Linux +理解 Linux 下不同分类的 Shell 命令及它们的用法 ==== When it comes to gaining absolute control over your Linux system, then nothing comes close to the command line interface (CLI). In order to become a Linux power user, one must understand the [different types of shell commands][1] and the appropriate ways of using them from the terminal. - -In Linux, there are several types of commands, and for a new Linux user, knowing the meaning of different commands enables for efficient and precise usage. Therefore, in this article, we shall walk through the various classifications of shell commands in Linux. - +当你打算真正操纵好你的 Linux 系统,没有什么更接近命令行界面。为了成为一个 Linux 高手,你必须能够理解【不同种类的 Shell 命令】【1】并且会在终端下正确的使用它们。 +In Linux, there are several types of commands, and for a new Linux user, knowing the meaning of different commands enables for efficient and precise usage. Therefore, in this article, we shall walk through the various classifications of shell commands in One important thing to note is that the command line interface is different from the shell, it only provides a means for you to access the shell. The shell, which is also programmable then makes it possible to communicate with the kernel using commands. Different classifications of Linux commands fall under the following classifications: From d9eb58d6c788172c5f7d1d7dc5961bc8effa0ab0 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Wed, 21 Sep 2016 19:36:53 +0800 Subject: [PATCH 09/17] Update 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...fications of Shell Commands and Their Usage in Linux.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md index d0e168f3ff..00faba61c2 100644 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -5,12 +5,15 @@ Understanding Different Classifications of Shell Commands and Their Usage in Lin When it comes to gaining absolute control over your Linux system, then nothing comes close to the command line interface (CLI). In order to become a Linux power user, one must understand the [different types of shell commands][1] and the appropriate ways of using them from the terminal. 当你打算真正操纵好你的 Linux 系统,没有什么更接近命令行界面。为了成为一个 Linux 高手,你必须能够理解【不同种类的 Shell 命令】【1】并且会在终端下正确的使用它们。 -In Linux, there are several types of commands, and for a new Linux user, knowing the meaning of different commands enables for efficient and precise usage. Therefore, in this article, we shall walk through the various classifications of shell commands in +In Linux, there are several types of commands, and for a new Linux user, knowing the meaning of different commands enables for efficient and precise usage. Therefore, in this article, we shall walk through the various classifications of shell commands inLinux. +在 Linux 下,有一些不同种类的命令,对于一个 Linux 新手来说,知道不同命令的意思才能够高效和准确的使用它们。因此,在这篇文章里,我们将会分享 Linux 下不同分类的 Shell 命令。 One important thing to note is that the command line interface is different from the shell, it only provides a means for you to access the shell. The shell, which is also programmable then makes it possible to communicate with the kernel using commands. - +需要注意一件非常重要的事:命令行界面和 Shell 是不同的,它只是为你提供一个访问 Shell 的方式。Shell 是可编程的,这使得它可以通过命令与内核进行交流。 Different classifications of Linux commands fall under the following classifications: +下面列出了 Linux 下不同种类的命令: ### 1. Program Executables (File System Commands) +### 1. 程序可执行文件(文件系统命令) When you run a command, Linux searches through the directories stored in the $PATH environmental variable from left to right for the executable of that specific command. From 14f349d311f7072af9ddd12a402c4ba24c312cf8 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Fri, 23 Sep 2016 10:56:01 +0800 Subject: [PATCH 10/17] Update 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...tions of Shell Commands and Their Usage in Linux.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md index 00faba61c2..4e911d0e3e 100644 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -16,23 +16,25 @@ Different classifications of Linux commands fall under the following classificat ### 1. 程序可执行文件(文件系统命令) When you run a command, Linux searches through the directories stored in the $PATH environmental variable from left to right for the executable of that specific command. - +当你执行一条命令的时候,Linux 通过从左到右搜索存储在 $PATH 环境变量中的目录来找到这条命令的可执行文件。 You can view the directories in the $PATH as follows: - +你可以像下面这样查看存储在 $PATH 中的目录 ``` $ echo $PATH /home/aaronkilik/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games ``` In the above order, the directory /home/aaronkilik/bin will be searched first followed by /usr/local/sbin and so on, the order is significant in the search process. - +在上面的命令中,目录 /home/aaronkilik/bin 将会被首先搜索,紧跟着是 /usr/local/sbin,然后一直接着下去。在搜索进程中,搜索顺序是至关重要的。 Examples of file system commands in /usr/bin directory: +比如在 /usr/bin 目录中的文件系统命令: ``` $ ll /bin/ ``` Sample Output +样本输出 ``` total 16284 @@ -64,8 +66,10 @@ lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzfgrep -> bzgrep* ``` ### 2. Linux Aliases +### 2. Linux 的别名 These are user defined commands, they are created using the alias shell built-in command, and contain other shell commands with some options and arguments. The ideas is to basically use new and short names for lengthy commands. +这些是命令是用户定义的, The syntax for creating an alias is as follows: From d7ddf86892ae473da472e1d991543524420db2b9 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Fri, 23 Sep 2016 14:04:57 +0800 Subject: [PATCH 11/17] Update 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...ions of Shell Commands and Their Usage in Linux.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md index 4e911d0e3e..7401dc634d 100644 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -69,15 +69,17 @@ lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzfgrep -> bzgrep* ### 2. Linux 的别名 These are user defined commands, they are created using the alias shell built-in command, and contain other shell commands with some options and arguments. The ideas is to basically use new and short names for lengthy commands. -这些是命令是用户定义的, +这些是用户定义的命令,它们是通过内置命令的别名壳创建的,其中包含其他一些选择和参数的 shell 命令。这个想法就是基本上使用新颖、简短的名字来命名冗长的命令。 The syntax for creating an alias is as follows: +创建一个别名的语法像下面这样: ``` $ alias newcommand='command -options' ``` To list all aliases on your system, issue the command below: +通过下面的命令,可以列举系统中的所有别名: ``` $ alias -p @@ -92,6 +94,7 @@ alias ls='ls --color=auto' ``` To create a new alias in Linux, go through some below examples. +要在 Linux 中创建一个新的别名,仔细阅读下面的例子。 ``` $ alias update='sudo apt update' @@ -102,20 +105,25 @@ $ alias -p | grep 'up' ![](http://www.tecmint.com/wp-content/uploads/2016/08/Create-Aliase-in-Linux.png) However, the aliases we have created above only work temporarily, when the system is restarted, they will not work after the next boot. You can set permanent aliases in your `.bashrc` file as shown below. +然而,上面这些我们创建的别名只能暂时的工作,当经过下一次引导,系统重启以后它们不再工作。你可以像下面展示的这样在 '.bashrc' 文件中设置永久别名。 ![](http://www.tecmint.com/wp-content/uploads/2016/08/Set-Linux-Aliases-Permanent.png) After adding them, run the command below to active. +添加以后,运行下面的命令来激活。 ``` $ source ~/.bashrc ``` ### 3. Linux Shell Reserved Words +### 3. Linus Shell 保留字 In shell programming, words such as if, then, fi, for, while, case, esac, else, until and many others are shell reserved words. As the description implies, they have specialized meaning to the shell. +在 shell 程序设计中,if,then,fi,for,while,case,esac,else,until 以及其他更多的字都是 shell 保留字。正如描述所暗示的,它们在 shell 中有特殊的含义。 You can list out all Linux shell keywords using type command as shown: +你可以通过使用下面展示的类型命令来列出所有的 shell 关键字: ``` $ type if then fi for while case esac else until @@ -131,6 +139,7 @@ until is a shell keyword ``` Suggested Read: 10 Useful Linux Chaining Operators with Practical Examples +推荐阅读: ### 4. Linux Shell Functions From f91433429848841f13b3f3df051829a7bc56980d Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Fri, 23 Sep 2016 14:35:53 +0800 Subject: [PATCH 12/17] Update 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...of Shell Commands and Their Usage in Linux.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md index 7401dc634d..85635100fb 100644 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -139,11 +139,13 @@ until is a shell keyword ``` Suggested Read: 10 Useful Linux Chaining Operators with Practical Examples -推荐阅读: +推荐阅读:10 个有用的 Linux 链接操作实例 ### 4. Linux Shell Functions +### 4. Linux shell 函数 A shell function is a group of commands that are executed collectively within the current shell. Functions help to carry out a specific task in a shell script. The conventional form of writing shell functions in a script is: +一个 shell 函数是一群在当前 shell 内一起执行的命令。函数有利于在 shell 脚本中实现特殊任务。在 shell 脚本中写 shell 函数的传统形式是下面这样: ``` function_name() { @@ -164,6 +166,7 @@ command2 ``` Let’s take a look at how to write shell functions in a script named shell_functions.sh. +让我们看一看如何在名为 shell_functions.sh 的脚本中写 shell 函数。 ``` #!/bin/bash @@ -177,8 +180,10 @@ upgrade_system ``` Instead of executing the two commands: sudo apt update and sudo apt dist-upgrade from the command line, we have written a simple shell function to execute the two commands as a single command, upgrade_system within a script. +并不是通过命令行执行两条命令:sudo apt update 和 sudo apt dist-upgrade,实际上我们已经写好了一个 shell 函数来像执行一条单一命令一样来执行两条命令,从而在一个脚本内升级系统。 Save the file and thereafter, make the script executable. Finally run it as below: +保存文件,然后使脚本可执行。最后像下面这样运行 shell 函数: ``` $ chmod +x shell_functions.sh @@ -188,10 +193,13 @@ $ ./shell_functions.sh ![](http://www.tecmint.com/wp-content/uploads/2016/08/Linux-Shell-Functions-Script.png) ### 5. Linux Shell Built-in Commands +### 5. Linux Shell 内置命令 These are Linux commands that built into the shell, thus you cannot find them within the file system. They include pwd, cd, bg, alias, history, type, source, read, exit and many others. +这些是在 shell 中内置的 Linux 命令,所以你无法在文件系统中找到它们。这些命令包括 pwd,cd,bg,alias,history,type,source,read,exit 等。 You can list or check Linux built-in commands using type command as shown: +你可以通过下面展示的类型命令来列出或检查 Linux 内置命令: ``` $ type pwd @@ -207,23 +215,27 @@ history is a shell builtin ``` Learn about some Linux built-in Commands usage: +学习一些 Linux 内置命令用法: - [15 ‘pwd’ Command Examples in Linux][2] - [15 ‘cd’ Command Examples in Linux][3] - [Learn The Power of Linux ‘history’ Command][4] ### Conclusion +### 结论 As a Linux user, it is always important to know the type of command you are running. I believe, with the precise and simple-to-understand explanation above including a few relevant illustrations, you probably have a good understanding of the [various categories of Linux commands][5]. +作为一个 Linux 用户,知道你所运行的命令类型是很重要的。我相信,通过上面明确、简单并且易于理解的解释,包括一些相关的说明,你可能对【不同种类的 Linux 命令】有了很好的理解。 You can as well get in tough through the comment section below for any questions or supplementary ideas that you would like to offer us. +你也可以在下面的评论区提任何问题或补充意见,从而和我们取得联系。 -------------------------------------------------------------------------------- via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ 作者:[Aaron Kili ][a] -译者:[译者ID](https://github.com/译者ID) +译者:[ucasFL](https://github.com/ucasFL) 校对:[校对者ID](https://github.com/校对者ID) 本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 From 830ea91e487d94fd97fb27f40b3f13149e53d949 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Fri, 23 Sep 2016 14:44:22 +0800 Subject: [PATCH 13/17] Update 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...Shell Commands and Their Usage in Linux.md | 47 ++++--------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md index 85635100fb..95ca797664 100644 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -1,39 +1,32 @@ -translating by ucasFL -Understanding Different Classifications of Shell Commands and Their Usage in Linux + 理解 Linux 下不同分类的 Shell 命令及它们的用法 ==== -When it comes to gaining absolute control over your Linux system, then nothing comes close to the command line interface (CLI). In order to become a Linux power user, one must understand the [different types of shell commands][1] and the appropriate ways of using them from the terminal. 当你打算真正操纵好你的 Linux 系统,没有什么更接近命令行界面。为了成为一个 Linux 高手,你必须能够理解【不同种类的 Shell 命令】【1】并且会在终端下正确的使用它们。 -In Linux, there are several types of commands, and for a new Linux user, knowing the meaning of different commands enables for efficient and precise usage. Therefore, in this article, we shall walk through the various classifications of shell commands inLinux. + 在 Linux 下,有一些不同种类的命令,对于一个 Linux 新手来说,知道不同命令的意思才能够高效和准确的使用它们。因此,在这篇文章里,我们将会分享 Linux 下不同分类的 Shell 命令。 -One important thing to note is that the command line interface is different from the shell, it only provides a means for you to access the shell. The shell, which is also programmable then makes it possible to communicate with the kernel using commands. + 需要注意一件非常重要的事:命令行界面和 Shell 是不同的,它只是为你提供一个访问 Shell 的方式。Shell 是可编程的,这使得它可以通过命令与内核进行交流。 -Different classifications of Linux commands fall under the following classifications: + 下面列出了 Linux 下不同种类的命令: -### 1. Program Executables (File System Commands) ### 1. 程序可执行文件(文件系统命令) -When you run a command, Linux searches through the directories stored in the $PATH environmental variable from left to right for the executable of that specific command. 当你执行一条命令的时候,Linux 通过从左到右搜索存储在 $PATH 环境变量中的目录来找到这条命令的可执行文件。 -You can view the directories in the $PATH as follows: + 你可以像下面这样查看存储在 $PATH 中的目录 ``` $ echo $PATH /home/aaronkilik/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games ``` -In the above order, the directory /home/aaronkilik/bin will be searched first followed by /usr/local/sbin and so on, the order is significant in the search process. 在上面的命令中,目录 /home/aaronkilik/bin 将会被首先搜索,紧跟着是 /usr/local/sbin,然后一直接着下去。在搜索进程中,搜索顺序是至关重要的。 -Examples of file system commands in /usr/bin directory: 比如在 /usr/bin 目录中的文件系统命令: ``` $ ll /bin/ ``` -Sample Output 样本输出 ``` @@ -65,20 +58,17 @@ lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzfgrep -> bzgrep* -rwxr-xr-x 1 root root 3642 May 20 2015 bzgrep* ``` -### 2. Linux Aliases ### 2. Linux 的别名 -These are user defined commands, they are created using the alias shell built-in command, and contain other shell commands with some options and arguments. The ideas is to basically use new and short names for lengthy commands. + 这些是用户定义的命令,它们是通过内置命令的别名壳创建的,其中包含其他一些选择和参数的 shell 命令。这个想法就是基本上使用新颖、简短的名字来命名冗长的命令。 -The syntax for creating an alias is as follows: 创建一个别名的语法像下面这样: ``` $ alias newcommand='command -options' ``` -To list all aliases on your system, issue the command below: 通过下面的命令,可以列举系统中的所有别名: ``` @@ -93,7 +83,6 @@ alias ll='ls -alF' alias ls='ls --color=auto' ``` -To create a new alias in Linux, go through some below examples. 要在 Linux 中创建一个新的别名,仔细阅读下面的例子。 ``` @@ -104,25 +93,21 @@ $ alias -p | grep 'up' ![](http://www.tecmint.com/wp-content/uploads/2016/08/Create-Aliase-in-Linux.png) -However, the aliases we have created above only work temporarily, when the system is restarted, they will not work after the next boot. You can set permanent aliases in your `.bashrc` file as shown below. 然而,上面这些我们创建的别名只能暂时的工作,当经过下一次引导,系统重启以后它们不再工作。你可以像下面展示的这样在 '.bashrc' 文件中设置永久别名。 ![](http://www.tecmint.com/wp-content/uploads/2016/08/Set-Linux-Aliases-Permanent.png) -After adding them, run the command below to active. 添加以后,运行下面的命令来激活。 ``` $ source ~/.bashrc ``` -### 3. Linux Shell Reserved Words ### 3. Linus Shell 保留字 -In shell programming, words such as if, then, fi, for, while, case, esac, else, until and many others are shell reserved words. As the description implies, they have specialized meaning to the shell. + 在 shell 程序设计中,if,then,fi,for,while,case,esac,else,until 以及其他更多的字都是 shell 保留字。正如描述所暗示的,它们在 shell 中有特殊的含义。 -You can list out all Linux shell keywords using type command as shown: 你可以通过使用下面展示的类型命令来列出所有的 shell 关键字: ``` @@ -138,14 +123,11 @@ else is a shell keyword until is a shell keyword ``` -Suggested Read: 10 Useful Linux Chaining Operators with Practical Examples 推荐阅读:10 个有用的 Linux 链接操作实例 -### 4. Linux Shell Functions ### 4. Linux shell 函数 -A shell function is a group of commands that are executed collectively within the current shell. Functions help to carry out a specific task in a shell script. The conventional form of writing shell functions in a script is: -一个 shell 函数是一群在当前 shell 内一起执行的命令。函数有利于在 shell 脚本中实现特殊任务。在 shell 脚本中写 shell 函数的传统形式是下面这样: +一个 shell 函数是一组在当前 shell 内一起执行的命令。函数有利于在 shell 脚本中实现特殊任务。在 shell 脚本中写 shell 函数的传统形式是下面这样: ``` function_name() { @@ -155,7 +137,7 @@ command2 } ``` -Alternatively, +或者像这样: ``` function function_name { @@ -165,7 +147,7 @@ command2 } ``` -Let’s take a look at how to write shell functions in a script named shell_functions.sh. + 让我们看一看如何在名为 shell_functions.sh 的脚本中写 shell 函数。 ``` @@ -179,10 +161,8 @@ sudo apt dist-upgrade; upgrade_system ``` -Instead of executing the two commands: sudo apt update and sudo apt dist-upgrade from the command line, we have written a simple shell function to execute the two commands as a single command, upgrade_system within a script. 并不是通过命令行执行两条命令:sudo apt update 和 sudo apt dist-upgrade,实际上我们已经写好了一个 shell 函数来像执行一条单一命令一样来执行两条命令,从而在一个脚本内升级系统。 -Save the file and thereafter, make the script executable. Finally run it as below: 保存文件,然后使脚本可执行。最后像下面这样运行 shell 函数: ``` @@ -192,13 +172,10 @@ $ ./shell_functions.sh ![](http://www.tecmint.com/wp-content/uploads/2016/08/Linux-Shell-Functions-Script.png) -### 5. Linux Shell Built-in Commands ### 5. Linux Shell 内置命令 -These are Linux commands that built into the shell, thus you cannot find them within the file system. They include pwd, cd, bg, alias, history, type, source, read, exit and many others. 这些是在 shell 中内置的 Linux 命令,所以你无法在文件系统中找到它们。这些命令包括 pwd,cd,bg,alias,history,type,source,read,exit 等。 -You can list or check Linux built-in commands using type command as shown: 你可以通过下面展示的类型命令来列出或检查 Linux 内置命令: ``` @@ -214,20 +191,16 @@ $ type history history is a shell builtin ``` -Learn about some Linux built-in Commands usage: 学习一些 Linux 内置命令用法: - [15 ‘pwd’ Command Examples in Linux][2] - [15 ‘cd’ Command Examples in Linux][3] - [Learn The Power of Linux ‘history’ Command][4] -### Conclusion ### 结论 -As a Linux user, it is always important to know the type of command you are running. I believe, with the precise and simple-to-understand explanation above including a few relevant illustrations, you probably have a good understanding of the [various categories of Linux commands][5]. 作为一个 Linux 用户,知道你所运行的命令类型是很重要的。我相信,通过上面明确、简单并且易于理解的解释,包括一些相关的说明,你可能对【不同种类的 Linux 命令】有了很好的理解。 -You can as well get in tough through the comment section below for any questions or supplementary ideas that you would like to offer us. 你也可以在下面的评论区提任何问题或补充意见,从而和我们取得联系。 -------------------------------------------------------------------------------- From 4921b944f23390f3b96282f466cf256829f3eedc Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Fri, 23 Sep 2016 14:46:03 +0800 Subject: [PATCH 14/17] Update 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...lassifications of Shell Commands and Their Usage in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md index 95ca797664..cce09a0c21 100644 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -103,7 +103,7 @@ $ alias -p | grep 'up' $ source ~/.bashrc ``` -### 3. Linus Shell 保留字 +### 3. Linux Shell 保留字 在 shell 程序设计中,if,then,fi,for,while,case,esac,else,until 以及其他更多的字都是 shell 保留字。正如描述所暗示的,它们在 shell 中有特殊的含义。 From 5e78b1608ea779c7e906382eebd2869104cd7555 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Fri, 23 Sep 2016 14:49:25 +0800 Subject: [PATCH 15/17] Update 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...lassifications of Shell Commands and Their Usage in Linux.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md index cce09a0c21..569e0c78bd 100644 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -58,7 +58,7 @@ lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzfgrep -> bzgrep* -rwxr-xr-x 1 root root 3642 May 20 2015 bzgrep* ``` -### 2. Linux 的别名 +### 2. Linux 别名 这些是用户定义的命令,它们是通过内置命令的别名壳创建的,其中包含其他一些选择和参数的 shell 命令。这个想法就是基本上使用新颖、简短的名字来命名冗长的命令。 From e94fc09efb67b0df8d2d812a9c406de135a57910 Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Fri, 23 Sep 2016 14:53:33 +0800 Subject: [PATCH 16/17] =?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 --- ...Shell Commands and Their Usage in Linux.md | 221 ++++++++++++++++++ 1 file changed, 221 insertions(+) create mode 100644 translated/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md diff --git a/translated/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/translated/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md new file mode 100644 index 0000000000..569e0c78bd --- /dev/null +++ b/translated/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md @@ -0,0 +1,221 @@ + +理解 Linux 下不同分类的 Shell 命令及它们的用法 +==== + +当你打算真正操纵好你的 Linux 系统,没有什么更接近命令行界面。为了成为一个 Linux 高手,你必须能够理解【不同种类的 Shell 命令】【1】并且会在终端下正确的使用它们。 + +在 Linux 下,有一些不同种类的命令,对于一个 Linux 新手来说,知道不同命令的意思才能够高效和准确的使用它们。因此,在这篇文章里,我们将会分享 Linux 下不同分类的 Shell 命令。 + +需要注意一件非常重要的事:命令行界面和 Shell 是不同的,它只是为你提供一个访问 Shell 的方式。Shell 是可编程的,这使得它可以通过命令与内核进行交流。 + +下面列出了 Linux 下不同种类的命令: + +### 1. 程序可执行文件(文件系统命令) + +当你执行一条命令的时候,Linux 通过从左到右搜索存储在 $PATH 环境变量中的目录来找到这条命令的可执行文件。 + +你可以像下面这样查看存储在 $PATH 中的目录 +``` +$ echo $PATH +/home/aaronkilik/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games +``` + +在上面的命令中,目录 /home/aaronkilik/bin 将会被首先搜索,紧跟着是 /usr/local/sbin,然后一直接着下去。在搜索进程中,搜索顺序是至关重要的。 +比如在 /usr/bin 目录中的文件系统命令: + +``` +$ ll /bin/ +``` + +样本输出 + +``` +total 16284 +drwxr-xr-x 2 root root 4096 Jul 31 16:30 ./ +drwxr-xr-x 23 root root 4096 Jul 31 16:29 ../ +-rwxr-xr-x 1 root root 6456 Apr 14 18:53 archdetect* +-rwxr-xr-x 1 root root 1037440 May 17 16:15 bash* +-rwxr-xr-x 1 root root 520992 Jan 20 2016 btrfs* +-rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-calc-size* +lrwxrwxrwx 1 root root 5 Jul 31 16:19 btrfsck -> btrfs* +-rwxr-xr-x 1 root root 278376 Jan 20 2016 btrfs-convert* +-rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-debug-tree* +-rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-find-root* +-rwxr-xr-x 1 root root 270136 Jan 20 2016 btrfs-image* +-rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-map-logical* +-rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-select-super* +-rwxr-xr-x 1 root root 253816 Jan 20 2016 btrfs-show-super* +-rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfstune* +-rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-zero-log* +-rwxr-xr-x 1 root root 31288 May 20 2015 bunzip2* +-rwxr-xr-x 1 root root 1964536 Aug 19 2015 busybox* +-rwxr-xr-x 1 root root 31288 May 20 2015 bzcat* +lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzcmp -> bzdiff* +-rwxr-xr-x 1 root root 2140 May 20 2015 bzdiff* +lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzegrep -> bzgrep* +-rwxr-xr-x 1 root root 4877 May 20 2015 bzexe* +lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzfgrep -> bzgrep* +-rwxr-xr-x 1 root root 3642 May 20 2015 bzgrep* +``` + +### 2. Linux 别名 + + +这些是用户定义的命令,它们是通过内置命令的别名壳创建的,其中包含其他一些选择和参数的 shell 命令。这个想法就是基本上使用新颖、简短的名字来命名冗长的命令。 + +创建一个别名的语法像下面这样: + +``` +$ alias newcommand='command -options' +``` + +通过下面的命令,可以列举系统中的所有别名: + +``` +$ alias -p +alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' +alias egrep='egrep --color=auto' +alias fgrep='fgrep --color=auto' +alias grep='grep --color=auto' +alias l='ls -CF' +alias la='ls -A' +alias ll='ls -alF' +alias ls='ls --color=auto' +``` + +要在 Linux 中创建一个新的别名,仔细阅读下面的例子。 + +``` +$ alias update='sudo apt update' +$ alias upgrade='sudo apt dist-upgrade' +$ alias -p | grep 'up' +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/08/Create-Aliase-in-Linux.png) + +然而,上面这些我们创建的别名只能暂时的工作,当经过下一次引导,系统重启以后它们不再工作。你可以像下面展示的这样在 '.bashrc' 文件中设置永久别名。 + +![](http://www.tecmint.com/wp-content/uploads/2016/08/Set-Linux-Aliases-Permanent.png) + +添加以后,运行下面的命令来激活。 + +``` +$ source ~/.bashrc +``` + +### 3. Linux Shell 保留字 + + +在 shell 程序设计中,if,then,fi,for,while,case,esac,else,until 以及其他更多的字都是 shell 保留字。正如描述所暗示的,它们在 shell 中有特殊的含义。 + +你可以通过使用下面展示的类型命令来列出所有的 shell 关键字: + +``` +$ type if then fi for while case esac else until +if is a shell keyword +then is a shell keyword +fi is a shell keyword +for is a shell keyword +while is a shell keyword +case is a shell keyword +esac is a shell keyword +else is a shell keyword +until is a shell keyword +``` + +推荐阅读:10 个有用的 Linux 链接操作实例 + +### 4. Linux shell 函数 + +一个 shell 函数是一组在当前 shell 内一起执行的命令。函数有利于在 shell 脚本中实现特殊任务。在 shell 脚本中写 shell 函数的传统形式是下面这样: + +``` +function_name() { +command1 +command2 +……. +} +``` + +或者像这样: + +``` +function function_name { +command1 +command2 +……. +} +``` + + +让我们看一看如何在名为 shell_functions.sh 的脚本中写 shell 函数。 + +``` +#!/bin/bash +#write a shell function to update and upgrade installed packages +upgrade_system(){ +sudo apt update; +sudo apt dist-upgrade; +} +#execute function +upgrade_system +``` + +并不是通过命令行执行两条命令:sudo apt update 和 sudo apt dist-upgrade,实际上我们已经写好了一个 shell 函数来像执行一条单一命令一样来执行两条命令,从而在一个脚本内升级系统。 + +保存文件,然后使脚本可执行。最后像下面这样运行 shell 函数: + +``` +$ chmod +x shell_functions.sh +$ ./shell_functions.sh +``` + +![](http://www.tecmint.com/wp-content/uploads/2016/08/Linux-Shell-Functions-Script.png) + +### 5. Linux Shell 内置命令 + +这些是在 shell 中内置的 Linux 命令,所以你无法在文件系统中找到它们。这些命令包括 pwd,cd,bg,alias,history,type,source,read,exit 等。 + +你可以通过下面展示的类型命令来列出或检查 Linux 内置命令: + +``` +$ type pwd +pwd is a shell builtin +$ type cd +cd is a shell builtin +$ type bg +bg is a shell builtin +$ type alias +alias is a shell builtin +$ type history +history is a shell builtin +``` + +学习一些 Linux 内置命令用法: + +- [15 ‘pwd’ Command Examples in Linux][2] +- [15 ‘cd’ Command Examples in Linux][3] +- [Learn The Power of Linux ‘history’ Command][4] + +### 结论 + +作为一个 Linux 用户,知道你所运行的命令类型是很重要的。我相信,通过上面明确、简单并且易于理解的解释,包括一些相关的说明,你可能对【不同种类的 Linux 命令】有了很好的理解。 + +你也可以在下面的评论区提任何问题或补充意见,从而和我们取得联系。 + +-------------------------------------------------------------------------------- + +via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ + +作者:[Aaron Kili ][a] +译者:[ucasFL](https://github.com/ucasFL) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: http://www.tecmint.com/author/aaronkili/ +[1]: http://www.tecmint.com/different-types-of-linux-shells/ +[2]: http://www.tecmint.com/pwd-command-examples/ +[3]: http://www.tecmint.com/cd-command-in-linux/ +[4]: http://www.tecmint.com/history-command-examples/ +[5]: http://www.tecmint.com/category/linux-commands/ From 97afd0be91cc918a07a442e6a15d2d48cb3f9ded Mon Sep 17 00:00:00 2001 From: Lv Feng Date: Fri, 23 Sep 2016 14:54:31 +0800 Subject: [PATCH 17/17] Delete 20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md --- ...Shell Commands and Their Usage in Linux.md | 221 ------------------ 1 file changed, 221 deletions(-) delete mode 100644 sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md diff --git a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md b/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md deleted file mode 100644 index 569e0c78bd..0000000000 --- a/sources/tech/20160826 Understanding Different Classifications of Shell Commands and Their Usage in Linux.md +++ /dev/null @@ -1,221 +0,0 @@ - -理解 Linux 下不同分类的 Shell 命令及它们的用法 -==== - -当你打算真正操纵好你的 Linux 系统,没有什么更接近命令行界面。为了成为一个 Linux 高手,你必须能够理解【不同种类的 Shell 命令】【1】并且会在终端下正确的使用它们。 - -在 Linux 下,有一些不同种类的命令,对于一个 Linux 新手来说,知道不同命令的意思才能够高效和准确的使用它们。因此,在这篇文章里,我们将会分享 Linux 下不同分类的 Shell 命令。 - -需要注意一件非常重要的事:命令行界面和 Shell 是不同的,它只是为你提供一个访问 Shell 的方式。Shell 是可编程的,这使得它可以通过命令与内核进行交流。 - -下面列出了 Linux 下不同种类的命令: - -### 1. 程序可执行文件(文件系统命令) - -当你执行一条命令的时候,Linux 通过从左到右搜索存储在 $PATH 环境变量中的目录来找到这条命令的可执行文件。 - -你可以像下面这样查看存储在 $PATH 中的目录 -``` -$ echo $PATH -/home/aaronkilik/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games -``` - -在上面的命令中,目录 /home/aaronkilik/bin 将会被首先搜索,紧跟着是 /usr/local/sbin,然后一直接着下去。在搜索进程中,搜索顺序是至关重要的。 -比如在 /usr/bin 目录中的文件系统命令: - -``` -$ ll /bin/ -``` - -样本输出 - -``` -total 16284 -drwxr-xr-x 2 root root 4096 Jul 31 16:30 ./ -drwxr-xr-x 23 root root 4096 Jul 31 16:29 ../ --rwxr-xr-x 1 root root 6456 Apr 14 18:53 archdetect* --rwxr-xr-x 1 root root 1037440 May 17 16:15 bash* --rwxr-xr-x 1 root root 520992 Jan 20 2016 btrfs* --rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-calc-size* -lrwxrwxrwx 1 root root 5 Jul 31 16:19 btrfsck -> btrfs* --rwxr-xr-x 1 root root 278376 Jan 20 2016 btrfs-convert* --rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-debug-tree* --rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-find-root* --rwxr-xr-x 1 root root 270136 Jan 20 2016 btrfs-image* --rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfs-map-logical* --rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-select-super* --rwxr-xr-x 1 root root 253816 Jan 20 2016 btrfs-show-super* --rwxr-xr-x 1 root root 249464 Jan 20 2016 btrfstune* --rwxr-xr-x 1 root root 245368 Jan 20 2016 btrfs-zero-log* --rwxr-xr-x 1 root root 31288 May 20 2015 bunzip2* --rwxr-xr-x 1 root root 1964536 Aug 19 2015 busybox* --rwxr-xr-x 1 root root 31288 May 20 2015 bzcat* -lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzcmp -> bzdiff* --rwxr-xr-x 1 root root 2140 May 20 2015 bzdiff* -lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzegrep -> bzgrep* --rwxr-xr-x 1 root root 4877 May 20 2015 bzexe* -lrwxrwxrwx 1 root root 6 Jul 31 16:19 bzfgrep -> bzgrep* --rwxr-xr-x 1 root root 3642 May 20 2015 bzgrep* -``` - -### 2. Linux 别名 - - -这些是用户定义的命令,它们是通过内置命令的别名壳创建的,其中包含其他一些选择和参数的 shell 命令。这个想法就是基本上使用新颖、简短的名字来命名冗长的命令。 - -创建一个别名的语法像下面这样: - -``` -$ alias newcommand='command -options' -``` - -通过下面的命令,可以列举系统中的所有别名: - -``` -$ alias -p -alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' -alias egrep='egrep --color=auto' -alias fgrep='fgrep --color=auto' -alias grep='grep --color=auto' -alias l='ls -CF' -alias la='ls -A' -alias ll='ls -alF' -alias ls='ls --color=auto' -``` - -要在 Linux 中创建一个新的别名,仔细阅读下面的例子。 - -``` -$ alias update='sudo apt update' -$ alias upgrade='sudo apt dist-upgrade' -$ alias -p | grep 'up' -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/08/Create-Aliase-in-Linux.png) - -然而,上面这些我们创建的别名只能暂时的工作,当经过下一次引导,系统重启以后它们不再工作。你可以像下面展示的这样在 '.bashrc' 文件中设置永久别名。 - -![](http://www.tecmint.com/wp-content/uploads/2016/08/Set-Linux-Aliases-Permanent.png) - -添加以后,运行下面的命令来激活。 - -``` -$ source ~/.bashrc -``` - -### 3. Linux Shell 保留字 - - -在 shell 程序设计中,if,then,fi,for,while,case,esac,else,until 以及其他更多的字都是 shell 保留字。正如描述所暗示的,它们在 shell 中有特殊的含义。 - -你可以通过使用下面展示的类型命令来列出所有的 shell 关键字: - -``` -$ type if then fi for while case esac else until -if is a shell keyword -then is a shell keyword -fi is a shell keyword -for is a shell keyword -while is a shell keyword -case is a shell keyword -esac is a shell keyword -else is a shell keyword -until is a shell keyword -``` - -推荐阅读:10 个有用的 Linux 链接操作实例 - -### 4. Linux shell 函数 - -一个 shell 函数是一组在当前 shell 内一起执行的命令。函数有利于在 shell 脚本中实现特殊任务。在 shell 脚本中写 shell 函数的传统形式是下面这样: - -``` -function_name() { -command1 -command2 -……. -} -``` - -或者像这样: - -``` -function function_name { -command1 -command2 -……. -} -``` - - -让我们看一看如何在名为 shell_functions.sh 的脚本中写 shell 函数。 - -``` -#!/bin/bash -#write a shell function to update and upgrade installed packages -upgrade_system(){ -sudo apt update; -sudo apt dist-upgrade; -} -#execute function -upgrade_system -``` - -并不是通过命令行执行两条命令:sudo apt update 和 sudo apt dist-upgrade,实际上我们已经写好了一个 shell 函数来像执行一条单一命令一样来执行两条命令,从而在一个脚本内升级系统。 - -保存文件,然后使脚本可执行。最后像下面这样运行 shell 函数: - -``` -$ chmod +x shell_functions.sh -$ ./shell_functions.sh -``` - -![](http://www.tecmint.com/wp-content/uploads/2016/08/Linux-Shell-Functions-Script.png) - -### 5. Linux Shell 内置命令 - -这些是在 shell 中内置的 Linux 命令,所以你无法在文件系统中找到它们。这些命令包括 pwd,cd,bg,alias,history,type,source,read,exit 等。 - -你可以通过下面展示的类型命令来列出或检查 Linux 内置命令: - -``` -$ type pwd -pwd is a shell builtin -$ type cd -cd is a shell builtin -$ type bg -bg is a shell builtin -$ type alias -alias is a shell builtin -$ type history -history is a shell builtin -``` - -学习一些 Linux 内置命令用法: - -- [15 ‘pwd’ Command Examples in Linux][2] -- [15 ‘cd’ Command Examples in Linux][3] -- [Learn The Power of Linux ‘history’ Command][4] - -### 结论 - -作为一个 Linux 用户,知道你所运行的命令类型是很重要的。我相信,通过上面明确、简单并且易于理解的解释,包括一些相关的说明,你可能对【不同种类的 Linux 命令】有了很好的理解。 - -你也可以在下面的评论区提任何问题或补充意见,从而和我们取得联系。 - --------------------------------------------------------------------------------- - -via: http://linoxide.com/firewall/pfsense-setup-basic-configuration/ - -作者:[Aaron Kili ][a] -译者:[ucasFL](https://github.com/ucasFL) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: http://www.tecmint.com/author/aaronkili/ -[1]: http://www.tecmint.com/different-types-of-linux-shells/ -[2]: http://www.tecmint.com/pwd-command-examples/ -[3]: http://www.tecmint.com/cd-command-in-linux/ -[4]: http://www.tecmint.com/history-command-examples/ -[5]: http://www.tecmint.com/category/linux-commands/