大多数 Unix 老手都知道 GNU core utilities
从那些我们几乎每天使用到的 ls, cp, ln, rm, touch, tail, wc 等等,到我们不常使用的 tsort, tac, factor, seq 等,除了这些 Unix 工具包,我发现还有一个包对我们的日常工作提供重大帮助,那就是: moreutils
安装
在讲解这个工具包中的每个工具时,我可以告诉大家这个对你使用什么 Linux 系统不会有讲究, 也可以安装在 Mac OS 和类 Unix 中。
在 Mac OS ,我们只需要输入如下命令:
$ brew install moreutils
注意: 在 GNU 的 parallel
工具包和 moreutils
会有冲突,所以在这类系统中,我们可安如下安装:
$ brew install moreutils --without-parallel
$ brew install parallel
相要了解更多? 请看 superuser 中的 How can I install GNU Parallel alongside Moreutils?
在 Linux 下,我们可以使用自己喜欢的包管理器或者命令来获取这个包,如果使用 Arch Linux
,则我们可以如下:
$ sudo pacman -S moreutils
如果在 Debian/Ubuntu/Mint 中,可以:
$ sudo apt-get install moreutils
如果在 RHEL, Fedora, CentOS 中,可以:
$ sudo yum install moreutils
未完,待续。。。