Merge remote-tracking branch 'LCTT/master'

This commit is contained in:
Xingyu Wang
2020-03-02 22:02:28 +08:00
3 changed files with 126 additions and 135 deletions

View File

@@ -1,76 +0,0 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (4 open source productivity tools on my wishlist)
[#]: via: (https://opensource.com/article/20/1/open-source-productivity-tools)
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
4 open source productivity tools on my wishlist
======
Find out what the open source world needs to work on in the final
article in our series on 20 ways to be more productive with open source
in 2020.
![Two diverse hands holding a globe][1]
Last year, I brought you 19 days of new (to you) productivity tools for 2019. This year, I'm taking a different approach: building an environment that will allow you to be more productive in the new year, using tools you may or may not already be using.
### But what about…
When searching for productivity apps, I never find everything I want, and I almost always miss something great that my readers share with me. So, as I bring this series to a close, it's time [again][2] to talk about some of the topics I failed to cover in this year's series.
![Desktop with Joplin, Emacs, and Firefox][3]
#### Chatting in Vim
I tried. I really, _really_ tried to get chat to work in Vim, but it was not to be. The one package I was able to find, [VimIRC.vim][4], never did work for me, and I tried for a few days to no avail. The other option I explored was [Irc it][5], which requires a lot more [effort to set up][6] than I could fit into my available space or time. I tried, I really did, and for the Vim users out there, I'm sorry I wasn't able to get something workable for you.
#### Org mode
![Org Mode in Emacs][7]
I love [Org Mode][8], and I use it daily. I could spend several days _just_ talking about Org. It provides basic [task tracking][9]; Google [calendar][10] sync and [CalFW][11] integration; rich text documents, websites, and presentations; linking to all the things; and; and; and…
I expect you will hear more from me about Org in 2020 because it really is pretty cool.
#### GUI programs
In 2019's productivity series, I shared a lot of programs with a graphical user interface (GUI), and this year almost all are command-line applications. There are some great graphical programs to help with some of the things I talked about this year—[mail][12] programs to talk to Maildir mailboxes, calendar programs to read local calendar files, [weather][13] apps, and so on. I even tried several new-to-me things to see if they would fit with the overall theme. With the exception of [twin][14], I didn't feel that there were any GUI programs that were new (to me) or notable (again, to me) to write about this year. And that brings me to…
#### Mobile
More and more people are using tablets (sometimes in conjunction with a laptop) as their primary device. I use my phone for most of my social media and instant messaging, and, more often than not, I use my tablet (OK, let's be honest, _tablets_) to read or browse the web. It isn't that open source mobile apps aren't out there, that's for sure, but they didn't fit with my themes this year. There is a lot going on with open source and mobile apps, and I'm watching carefully for things that can help me be more productive on my phone and tablet.
### Your turn
Thank you very much for reading the series this year. Please comment with what you think I missed or need to look at for 2021. And as I say on the [Productivity Alchemy][15] podcast: "Remember folks: Stay productive!"
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/1/open-source-productivity-tools
作者:[Kevin Sonney][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ksonney
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe)
[2]: https://opensource.com/article/19/1/productivity-tool-wish-list
[3]: https://opensource.com/sites/default/files/uploads/productivity_20-1.png (Desktop with Joplin, Emacs, and Firefox)
[4]: https://github.com/vim-scripts/VimIRC.vim
[5]: https://tools.suckless.org/ii/
[6]: https://www.reddit.com/r/vim/comments/48t7ws/vim_ii_irc_client_xpost_runixporn/d0macnl/
[7]: https://opensource.com/sites/default/files/uploads/productivity_20-2.png (Org Mode in Emacs)
[8]: https://orgmode.org/
[9]: https://opensource.com/article/20/1/open-source-to-do-list
[10]: https://opensource.com/article/20/1/open-source-calendar
[11]: https://github.com/kiwanami/emacs-calfw
[12]: https://opensource.com/article/20/1/organize-email-notmuch
[13]: https://opensource.com/article/20/1/open-source-weather-forecast
[14]: https://github.com/cosmos72/twin
[15]: https://productivityalchemy.com

View File

@@ -1,5 +1,5 @@
[#]: collector: (lujun9972)
[#]: translator: ( )
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
@@ -7,95 +7,90 @@
[#]: via: (https://opensource.com/article/20/2/trim-solid-state-storage-linux)
[#]: author: (Alan Formy-Duval https://opensource.com/users/alanfdoss)
Extend the life of your SSD drive with fstrim
在 Linux 下使用 fstrim 延长 SSD 驱动器的寿命
======
A new systemd service to make your life easier.
> 这个新的系统服务可以使你的生活更轻松。
![Linux keys on the keyboard for a desktop computer][1]
Over the past decade, solid-state drives (SSD) have brought about a new way of managing storage. SSDs have benefits like silent and cooler operation and a faster interface spec, compared to their elder spinning ancestors. Of course, new technology brings with it new methods of maintenance and management. SSDs have a feature called TRIM. This is essentially a method for reclaiming unused blocks on the device, which may have been previously written, but no longer contain valid data and therefore, can be returned to the general storage pool for reuse. Opensource.coms Don Watkins first wrote about TRIM in his 2017 article ["Solid-state drives in Linux: Enabling TRIM for SSDs."][2]
在过去的十年中固态驱动器SSD带来了一种管理存储的新方法。与上一代的转盘产品相比SSD 具有无声、更冷却的操作和更快的接口规格等优点。当然新技术带来了新的维护和管理方法。SSD 具有称为 TRIM 的功能。从本质上讲,这是一种用于回收设备上未使用的块的方法,该块可能先前已被写入,但不再包含有效数据,因此可以返回到通用存储池以供重用。Opensource.com Don Watkins 在首先其 2017 年的文章《[Linux 固态驱动器:为 SSD 启用 TRIM][2]》中介绍了 TRIM 的内容。
If you have been using this feature on your Linux system, then you are probably familiar with the two methods described below.
如果你一直在 Linux 系统上使用此功能,则你可能熟悉下面描述的两种方法。
### The old ways
### 老的方式
#### Discard
I initially enabled this with the discard option to the mount command. The configuration is placed into the **/etc/fstab** file for each file system.
#### 丢弃选项
我最初使用 `mount` 命令的 `discard` 选项启用了此功能。每个文件系统的配置都放在 `/etc/fstab` 文件中。
```
# cat /etc/fstab
UUID=3453g54-6628-2346-8123435f  /home  xfs  defaults,discard   0 0
```
The discard option enables automatic online TRIM. There has recently been debate on whether this is the best method due to possible negative performance impacts. Using this option causes a TRIM to be initiated every time new data is written to the drive. This may introduce additional activity that interferes with storage performance.
丢弃选项可启用自动的在线 TRIM。由于可能会对性能造成负面影响最近关于这是否是最佳方法一直存在争议。使用此选项会在每次将新数据写入驱动器时启动 TRIM。这可能会引入其他活动从而影响存储性能。
#### Cron
I removed the discard option from the **fstab** file. Then I created a cron job to call the command on a scheduled basis.
#### Cron 作业
我从 `fstab` 文件中删除了丢弃选项。然后,我创建了一个 cron 作业来按计划调用该命令。
```
# crontab -l
@midnight /usr/bin/trim
```
This is the method I used most recently on my Ubuntu Linux systems until I learned about another way.
这是我最近在 Ubuntu Linux 系统上使用的方法,直到我了解到另一种方法。
### A new TRIM service
### 一个新的 TRIM 服务
I recently discovered that a systemd service for TRIM exists. Fedora [introduced][3] this into their distribution in version 30, and, although it is not enabled by default in versions 30 and 31, it is planned to be in version 32. If youre working on Fedora Workstation 31 and you want to begin using this feature, you can enable it very easily. Ill also show you how to test it below. This service is not unique to Fedora. The existence and status will depend on an individual distribution basis.
我最近发现有一个用于 TRIM 的 systemd 服务。Fedora 在版本 30 中将其[引入][3],尽管默认情况下在版本 30 和 31 中未启用它,但计划在版本 32 中使用它。如果你使用的是 Fedora 工作站 31并且你想要开始使用此功能可以非常轻松地启用它。我还将在下面向你展示如何对其进行测试。该服务并非 Fedora 独有的服务。它是否存在和地位将因发行版而异。
#### Test
I like to test first, to better understand what is happening behind the scenes. I do this by opening a terminal and issuing the command that the service is configured to call.
#### 测试
我喜欢先进行测试,以更好地了解幕后情况。我通过打开终端并发出配置服务调用的命令来执行此操作。
```
`/usr/sbin/fstrim --fstab --verbose --quiet`
/usr/sbin/fstrim --fstab --verbose --quiet
```
The **help** argument to **fstrim** will describe these and other arguments.
`fstrim``-help` 参数将描述这些信息和其他参数。
```
$ sudo /usr/sbin/fstrim --help
Usage:
 fstrim [options] <mount point>
fstrim [options] <mount point>
Discard unused blocks on a mounted filesystem.
Options:
 -a, --all           trim all supported mounted filesystems
 -A, --fstab         trim all supported mounted filesystems from /etc/fstab
 -o, --offset &lt;num&gt;  the offset in bytes to start discarding from
 -l, --length &lt;num&gt;  the number of bytes to discard
 -m, --minimum &lt;num&gt; the minimum extent length to discard
 -v, --verbose       print number of discarded bytes
     --quiet         suppress error messages
 -n, --dry-run       does everything, but trim
-a, --all trim all supported mounted filesystems
-A, --fstab trim all supported mounted filesystems from /etc/fstab
-o, --offset <num> the offset in bytes to start discarding from
-l, --length <num> the number of bytes to discard
-m, --minimum <num> the minimum extent length to discard
-v, --verbose print number of discarded bytes
--quiet suppress error messages
-n, --dry-run does everything, but trim
 -h, --help          display this help
 -V, --version       display version
-h, --help display this help
-V, --version display version
```
So, now I can see that the systemd service is configured to run the trim on all supported mounted filesystems in my **/etc/fstab** file **fstab** and print the number of discarded bytes **verbose** but suppress any error messages that might occur **quiet**. Knowing these options is helpful for testing. For instance, I can start with the safest one, which is the dry run. Ill also leave off the quiet argument so I can determine if any errors will occur with my drive setup.
因此,现在我可以看到这个 systemd 服务已配置为在我的 `/etc/fstab` 文件中的所有受支持的挂载文件系统上运行该修剪操作( `-fstab`),并打印出丢弃的字节数(`-verbose`),但是抑制了任何可能会发生的错误消息(`quiet`)。了解这些选项对测试很有帮助。例如,我可以从最安全的方法开始,即空运行。 我还将去掉 `-quiet` 参数,以便确定驱动器设置是否发生任何错误。
```
`$ sudo /usr/sbin/fstrim --fstab --verbose --dry-run`
$ sudo /usr/sbin/fstrim --fstab --verbose --dry-run
```
This will simply show what the **fstrim** command will do based on the file systems that it finds configured in your **/etc/fstab** file.
这就会显示 `fstrim` 命令根据在 `/etc/fstab` 文件中找到的文件系统要执行的操作。
```
`$ sudo /usr/sbin/fstrim --fstab --verbose`
$ sudo /usr/sbin/fstrim --fstab --verbose
```
This will now send the TRIM operation to the drive and report on the number of discarded bytes from each file system. Below is an example after my recent fresh install of Fedora on a new NVME SSD.
现在,这会将 TRIM 操作发送到驱动器,并报告每个文件系统中丢弃的字节数。以下是我最近在新的 NVME SSD 上全新安装 Fedora 之后的示例。
```
/home: 291.5 GiB (313011310592 bytes) trimmed on /dev/mapper/wkst-home
@@ -104,44 +99,40 @@ This will now send the TRIM operation to the drive and report on the number of d
/: 60.7 GiB (65154805760 bytes) trimmed on /dev/mapper/wkst-root
```
#### Enable
Fedora Linux implements systemd timer service, scheduled to run on a weekly basis. To check the existence and current status, run **systemctl status**.
#### 启用
Fedora Linux 实现了一个计划每周运行它的 systemd 计时器服务。要检查其是否存在和当前状态,请运行 `systemctl status`
```
`$ sudo systemctl status fstrim.timer`
$ sudo systemctl status fstrim.timer
```
Now, enable the service.
现在,启用该服务。
```
`$ sudo systemctl enable fstrim.timer`
$ sudo systemctl enable fstrim.timer
```
#### Verify
Then you can verify that the timer is enabled by listing all of the timers.
#### 验证
然后,你可以通过列出所有计时器来验证该计时器是否已启用。
```
`$ sudo systemctl list-timers --all`
$ sudo systemctl list-timers --all
```
The following line referring to the **fstrim.timer** will appear. Notice that the timer actually activates **fstrim.service**. This is from where the actual **fstrim** is called. The time-related fields show **n/a** because the service has just been enabled and has not run yet.
会显示出下列表明 `fstrim.timer` 存在的行。注意,该计时器实际上激活了 `fstrim.service`。这是 `fstrim` 实际调用的地方。与时间相关的字段显示为 `n/a`,因为该服务已启用且尚未运行。
```
NEXT   LEFT    LAST   PASSED   UNIT           ACTIVATES
n/a    n/a     n/a    n/a      fstrim.timer   fstrim.service
```
### Conclusion
### 结论
This service seems like the best way to run TRIM on your drives. It is much simpler than having to create your own crontab entry to call the **fstrim** command. It is also safer not having to edit the **fstab** file. It has been interesting to watch the evolution of solid-state storage technology and nice to know that it appears Linux is moving toward a standard and safe way to implement it.
该服务似乎是在驱动器上运行 TRIM 的最佳方法。这比必须创建自己的 crontab 条目来调用 `fstrim` 命令要简单得多。不必编辑 `fstab` 文件也更安全。观察固态存储技术的发展很有趣,并且我很高兴看到 Linux 似乎正在朝着标准且安全的方向实现它。
In this article, learn how solid state drives differ from traditional hard drives and what it means...
在本文中,学习了固态驱动器与传统硬盘驱动器有何不同以及它的含义...
--------------------------------------------------------------------------------
@@ -149,7 +140,7 @@ via: https://opensource.com/article/20/2/trim-solid-state-storage-linux
作者:[Alan Formy-Duval][a]
选题:[lujun9972][b]
译者:[译者ID](https://github.com/译者ID)
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
@@ -157,5 +148,5 @@ via: https://opensource.com/article/20/2/trim-solid-state-storage-linux
[a]: https://opensource.com/users/alanfdoss
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux_keyboard_desktop.png?itok=I2nGw78_ (Linux keys on the keyboard for a desktop computer)
[2]: https://opensource.com/article/17/1/solid-state-drives-linux-enabling-trim-ssds
[2]: https://linux.cn/article-8177-1.html
[3]: https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer (Fedora Project WIKI: Changes/EnableFSTrimTimer)

View File

@@ -0,0 +1,76 @@
[#]: collector: (lujun9972)
[#]: translator: (wxy)
[#]: reviewer: ( )
[#]: publisher: ( )
[#]: url: ( )
[#]: subject: (4 open source productivity tools on my wishlist)
[#]: via: (https://opensource.com/article/20/1/open-source-productivity-tools)
[#]: author: (Kevin Sonney https://opensource.com/users/ksonney)
我的愿望清单上的 4 个开源生产力工具
======
> 在 2020 年用开源实现更高生产力的二十种方式的最后一篇文章中,了解开源世界需要做什么。
![Two diverse hands holding a globe][1]
去年,我在 19 天里给你介绍了 19 个新(对你而言)的生产力工具。今年,我换了一种方式:使用你在使用或者还没使用的工具,构建一个使你可以在新一年更加高效的环境。
### 不过…
在搜索生产力应用程序时,我找不到想要的一切应用,而且几乎总是会丢失一些读者与我分享的精彩内容。 因此,当我结束本系列文章时,是时候[再次][2]谈论我在本年度系列文章中未能涵盖的一些主题。
![Desktop with Joplin, Emacs, and Firefox][3]
#### 在 Vim 中聊天
我试过了。我真的非常非常想能够在 Vim 中聊天,但我做不到。我找到的一个软件包 [VimIRC.vim][4] 一直就工作不起来,我试了几天也没用。我探索的另一个选项是 [Irc it][5],这需要我付出更多的[努力去设置][6],超过了我正常可以付出的耐心或时间。我尝试过了,也确实做到了,但对于同处于相同境地的 Vim 用户,对不起,我无法帮到你。
#### Org 模式
![Org Mode in Emacs][7]
我喜欢 [Org 模式][8],并且每天都使用它。关于 Org 模式我可以滔滔不绝的说上几天。它提供了基本的[任务跟踪][9];谷歌[日历][10]同步和 [CalFW][11] 集成;富文本文档、网站和演示文稿;链接到任何事物;等等、等等……
我希望你会在 2020 年从我这里收到更多有关 Org 模式的信息,因为它真的很酷。
#### 图形用户界面程序
在 2019 年的生产力系列中,我共享了很多图形用户界面程序,而今年几乎都是命令行应用程序。有一些很棒的图形程序可以帮助解决我今年谈论的一些问题,例如可以使用 Maildir 邮箱的[邮件][12]程序、用于读取本地日历文件的日历程序、[天气][13]应用程序等等。我甚至尝试了几项对我而言新奇的事物,看它们是否适合这个主题。除了 [twin][14] 之外,我没有感觉到有什么图形用户界面程序是新颖的(对我而言)或值得注意的(同样对我而言)今年要写的。至于……
#### 移动应用程序
越来越多的人将平板电脑(有时与笔记本电脑结合使用)作为主要设备。我将手机用于大多数社交媒体和即时消息传递,并且经常使用平板电脑(好的,老实说,好几个平板电脑)来阅读或浏览网络。可以肯定的是,并不是开源移动应用程序不存在,但是它们与我今年的主题不符。开源和移动应用程序正在发生很多变化,我正在仔细地寻找可以帮助我在手机和平板电脑上提高工作效率的事物。
### 该你了
非常感谢你阅读今年的系列文章。请你发表评论,告诉我错过的或需要在 2021 年看到的内容。正如我在 [Productivity Alchemy] [15] 播客上所说:“哥们,记着:保持生产力!”
--------------------------------------------------------------------------------
via: https://opensource.com/article/20/1/open-source-productivity-tools
作者:[Kevin Sonney][a]
选题:[lujun9972][b]
译者:[wxy](https://github.com/wxy)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
[a]: https://opensource.com/users/ksonney
[b]: https://github.com/lujun9972
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/world_hands_diversity.png?itok=zm4EDxgE (Two diverse hands holding a globe)
[2]: https://opensource.com/article/19/1/productivity-tool-wish-list
[3]: https://opensource.com/sites/default/files/uploads/productivity_20-1.png (Desktop with Joplin, Emacs, and Firefox)
[4]: https://github.com/vim-scripts/VimIRC.vim
[5]: https://tools.suckless.org/ii/
[6]: https://www.reddit.com/r/vim/comments/48t7ws/vim_ii_irc_client_xpost_runixporn/d0macnl/
[7]: https://opensource.com/sites/default/files/uploads/productivity_20-2.png (Org Mode in Emacs)
[8]: https://orgmode.org/
[9]: https://opensource.com/article/20/1/open-source-to-do-list
[10]: https://opensource.com/article/20/1/open-source-calendar
[11]: https://github.com/kiwanami/emacs-calfw
[12]: https://opensource.com/article/20/1/organize-email-notmuch
[13]: https://opensource.com/article/20/1/open-source-weather-forecast
[14]: https://github.com/cosmos72/twin
[15]: https://productivityalchemy.com