mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
commit
8d9777a37e
@ -1,6 +1,7 @@
|
||||
在Linux上组成RAID 10阵列以实现高性能和高容错性的磁盘I/O
|
||||
如何在Linux上构建 RAID 10阵列
|
||||
================================================================================
|
||||
RAID 10阵列 (又名RAID 1+0 或先镜像后分区)通过结合RAID 0 (读写操作并行在多个磁盘上同时执行)和RAID 1 (数据被完全相同地写入到两个或更多的磁盘)两者的特点实现高性能和高容错性的磁盘I/O。
|
||||
|
||||
RAID 10阵列(又名RAID 1+0 或先镜像后分区)通过结合RAID 0 (读写操作在多个磁盘上同时并行执行)和RAID 1(数据被完全相同地写入到两个或更多的磁盘)两者的特点实现高性能和高容错性的磁盘I/O。
|
||||
|
||||
这篇文章会指导你如何使用五块相同的8GB磁盘来组成一个软件RAID 10阵列。因为组成一个RAID 10阵列至少需要4块磁盘(比如,两个镜像各有一对分区组合),而且需要添加一块额外的备用磁盘以防某块主要的磁盘出错。本文也会分享一些工具,在稍后用来分析RAID阵列的性能。
|
||||
|
||||
@ -12,15 +13,15 @@ RAID 10阵列 (又名RAID 1+0 或先镜像后分区)通过结合RAID 0 (读写
|
||||
|
||||

|
||||
|
||||
上图中的文件由A、B、C、D、E和F六种块组成,每一个RAID 1镜像对(如镜像1和2)在两个磁盘上复制相同的块。因为需要这样配置,写操作性能会因为每个块需要写入两次而下降,每个磁盘各一次;而读操作与从单块磁盘中读取相比并未发生改变。不过这种配置的好处是除非一个镜像中有超过一块的磁盘故障,否则都能保持冗余以维持正常的磁盘I/O操作。
|
||||
上图中的文件由A、B、C、D、E和F六种块组成,每一个RAID 1镜像对(如镜像1和2)在两个磁盘上复制相同的块。在这样的配置下,写操作性能会因为每个块需要写入两次而下降,每个磁盘各一次;而读操作与从单块磁盘中读取相比并未发生改变。不过这种配置的好处是除非一个镜像中有超过一块的磁盘故障,否则都能保持冗余以维持正常的磁盘I/O操作。
|
||||
|
||||
RAID 0的分区通过将数据划分到不同的块,然后执行同时将块A写入镜像1、将块B写入镜像2(以此类推)的并行操作以提高整体的读写性能。在另一方面,没有任何一个镜像包含构成主存的数据片的全部信息。这就意味着如果其中一个镜像故障,那么整个RAID 0组件将无法正常工作,数据将遭受不可恢复的损失。
|
||||
|
||||
### 建立RAID 10阵列 ###
|
||||
|
||||
有两种建立RAID 10阵列的可行方案:复杂法(一步完成)和嵌套法(先创建两个或更多的RAID 1阵列,然后使用它们组成RAID 0)。本文会关注复杂法创建RAID 10阵列,因为这种方法能够使用偶数或奇数个磁盘去创建阵列,而且能以单个RAID设备的形式被管理,而嵌套法则恰恰相反(只允许偶数个磁盘,必须以嵌套设备的形式被管理,即分开管理RAID 1和RAID 0)。
|
||||
有两种建立RAID 10阵列的可行方案:复杂法(一步完成)和嵌套法(先创建两个或更多的RAID 1阵列,然后使用它们组成RAID 0)。本文会讲述复杂法创建RAID 10阵列的过程,因为这种方法能够使用偶数或奇数个磁盘去创建阵列,而且能以单个RAID设备的形式被管理,而嵌套法则恰恰相反(只允许偶数个磁盘,必须以嵌套设备的形式被管理,即分开管理RAID 1和RAID 0)。
|
||||
|
||||
假设你的机器已经安装mdadm,并运行着相应的守护进程,细节参见[这篇文章][1]。也假设每个磁盘上已经划分出一个主分区sd[bcdef]1。使用命令
|
||||
假设你的机器已经安装mdadm,并运行着相应的守护进程,细节参见[这篇文章][1]。也假设每个磁盘上已经划分出一个主分区sd[bcdef]1 (LCTT 译注:共计五块磁盘,这里是从sdb - sdf)。使用命令:
|
||||
|
||||
ls -l /dev | grep sd[bcdef]
|
||||
|
||||
@ -28,7 +29,7 @@ RAID 0的分区通过将数据划分到不同的块,然后执行同时将块A
|
||||
|
||||

|
||||
|
||||
然后使用下面的命令创建一个RAID 10阵列:
|
||||
然后使用下面的命令创建一个RAID 10阵列(LCTT 译注:使用了四块磁盘 bcde 创建):
|
||||
|
||||
# mdadm --create --verbose /dev/md0 --level=10 --raid-devices=4 /dev/sd[bcde]1 --spare-devices=1 /dev/sdf1
|
||||
|
||||
@ -46,29 +47,29 @@ RAID 0的分区通过将数据划分到不同的块,然后执行同时将块A
|
||||
|
||||
1. **Used Dev Space**表示阵列所使用的每一块磁盘的容量。
|
||||
|
||||
2. **Array Size**表示阵列的整体大小。RAID 10阵列的大小通过(N*C)/M计算,其中N是活跃磁盘的数目,C是活跃磁盘的总容量,M是每一个镜像中磁盘的数目。在本文的情形下,这个值等于(4*8GiB)/2 = 16GiB。
|
||||
2. **Array Size**表示阵列的整体大小。RAID 10阵列的大小通过(N\*C)/M计算,其中N是活跃磁盘的数目,C是每个活跃磁盘的容量,M是每一个镜像中磁盘的数目。在本文的情形下,这个值等于(4*8GiB)/2 = 16GiB。
|
||||
|
||||
3. **Layout**是整个数据布局的详细信息。可能的布局数值如下所示。
|
||||
|
||||
----------
|
||||
|
||||
- **n**(默认选项):代表就近拷贝。一个数据块的多个拷贝在不同磁盘里有相同的偏移量。这种布局提供和RAID 0阵列相似的读写性能。
|
||||
- **n**(默认选项):代表就近(near)拷贝。一个数据块的多个拷贝在不同磁盘里有相同的偏移量。这种布局提供和RAID 0阵列相似的读写性能。
|
||||
|
||||

|
||||
|
||||
- **o**代表偏移量拷贝。不是复制一个分区里的块,所有的分区都被复制,但会被循环打乱,所以同一个分区中复制的块会出现在不同的磁盘。因此,一个块的后续拷贝会出现在下一个磁盘中,一个块接着一个块。为了在RAID 10阵列中使用这种布局,在创建阵列的命令中添加--layout=o2选项。
|
||||
- **o**代表偏移量(offset)拷贝。块并不是在条带里面复制的,而是整个条带一起复制,但是循环会打乱,所以同一个分区中复制的块会出现在不同的磁盘。因此,一个块的后续拷贝会出现在下一个磁盘中,一个块接着一个块。为了在RAID 10阵列中使用这种布局,在创建阵列的命令中添加--layout=o2选项。
|
||||
|
||||

|
||||
|
||||
- **f**代表远端拷贝(多个拷贝在不同的磁盘中具有不同的偏移量)。这种布局提供更好的读性能但带来更差的写性能。因此,对于读远远多于写的系统来说是最好的选择。为了在RAID 10阵列中使用这种布局,在创建阵列的命令中添加--layout=f2。
|
||||
- **f**代表远端(far)拷贝(多个拷贝在不同的磁盘中具有不同的偏移量)。这种布局提供更好的读性能但带来更差的写性能。因此,对于读远远多于写的系统来说是最好的选择。为了在RAID 10阵列中使用这种布局,在创建阵列的命令中添加--layout=f2。
|
||||
|
||||

|
||||
|
||||
跟在布局选项**n**、**f**和**o**后面的数字代表所需的每一个数据块的副本数目。默认值是2,但可以是2到阵列中磁盘数目之间的某个值。提供足够的副本数目可以最小化单个磁盘上的I/O影响。
|
||||
|
||||
4. **Chunk Size**,以[Linux RAID wiki][2]为准,是写入磁盘的最小数据单元。最佳的chunk大小取决于I/O操作的速率和相关的文件大小。对于大量的写操作,通过设置相对较大的chunks可以得到更低的开销,但对于主要存储小文件的阵列来说更小的chunk性能更好。为了给RAID 10指定一个chunk大小,在创建阵列的命令中添加**--chunk=desired_chunk_size**。
|
||||
4. **Chunk Size**,参考[Linux RAID wiki][2]的说明,是写入磁盘的最小数据单元。最佳的chunk大小取决于I/O操作的速率和相关的文件大小。对于大量的写操作,通过设置相对较大的chunk可以得到更低的开销,但对于主要存储小文件的阵列来说更小的chunk性能更好。为了给RAID 10指定一个chunk大小,在创建阵列的命令中添加**--chunk=desired_chunk_size**。
|
||||
|
||||
不幸的是,并没有设置一个大小就能适合全局的策略用来提高性能,但可以参考下面的一些方案。
|
||||
不幸的是,并没有设置一个大小就能适合全局的策略来提高性能,但可以参考下面的一些方案。
|
||||
|
||||
- 文件系统:就整体而言,[XFS][3]据说是最好的,当然EXT4也是不错的选择。
|
||||
- 最佳布局:远端布局能提高读性能,但会降低写性能。
|
||||
@ -127,7 +128,7 @@ via: http://xmodulo.com/setup-raid10-linux.html
|
||||
|
||||
作者:[Gabriel Cánepa][a]
|
||||
译者:[KayGuoWhu](https://github.com/KayGuoWhu)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -4,13 +4,13 @@ Linux有问必答——如何在Linux命令行中剪裁图像
|
||||
|
||||
当涉及到在Linux中转换或编辑图像文件时,ImageMagick毫无疑问是最为熟知的一体化软件之一。它包含了一整套命令行工具,用以显示、转换,或复制超过200中类型的光栅或矢量图像文件,所有这一切都在命令行下完成。ImageMagick可以用于多样化的图像编辑工作,如转换文件格式,添加特殊效果,添加文本,以及改变图像(调整大小、旋转、翻转、剪裁)。
|
||||
|
||||
如果你想要剪裁映像以剪除空白,你可以使用ImageMagick自带的两个命令行工具。如果你还没有安装ImageMagick,请遵循[本指南][1]来安装。
|
||||
如果你想要剪裁映像以去除空白,你可以使用ImageMagick自带的两个命令行工具。如果你还没有安装ImageMagick,请参照[本指南][1]来安装。
|
||||
|
||||
在本教程中,让我们来剪裁以下PNG图像。我们想要去除图像右边和底部的空白,以便让图标居中。
|
||||
在本教程中,让我们来剪裁以下PNG图像。我们想要去除图像右边和底部的边缘,以便让图标居中。
|
||||
|
||||

|
||||
|
||||
首先,鉴定图像文件的尺寸(宽度和高度)。你可以使用identity命令来完成此事。
|
||||
首先,鉴定图像文件的尺寸(宽度和高度)。你可以使用identity命令来完成。
|
||||
|
||||
$ identify chart.png
|
||||
|
||||
@ -20,9 +20,9 @@ Linux有问必答——如何在Linux命令行中剪裁图像
|
||||
|
||||
就像上面显示的那样,输入的图像是1500x1000px。
|
||||
|
||||
接下来,确定图像剪裁要做的两件事:(1)剪裁图像开始的位置,和(2)剪裁矩形区域的大小。
|
||||
接下来,确定图像剪裁要做的两件事:(1)剪裁图像开始的位置(2)剪裁矩形区域的大小。
|
||||
|
||||
在本例中,让我们假定图像剪裁从左上角开始,更精确点是在x=20px和y=10px,那样的话,剪裁后的图像尺寸为1200x700px。
|
||||
在本实例中,让我们假定图像剪裁从左上角开始,更精确点是在x=20px和y=10px,那样的话,剪裁后的图像尺寸为1200x700px。
|
||||
|
||||
用于剪裁图像的工具是convert。使用“-crop”选项后,convert命令会在输入图像中剪裁出一个矩形区域。
|
||||
|
||||
@ -37,7 +37,7 @@ Linux有问必答——如何在Linux命令行中剪裁图像
|
||||
via: http://ask.xmodulo.com/crop-image-command-line-linux.html
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
校对:[Caroline](https://github.com/carolinewuyan)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,53 +0,0 @@
|
||||
Linux Kernel 3.18 Released, This Is What’s New
|
||||
================================================================================
|
||||

|
||||
|
||||
TuxlogoA new month means a new stable release of the Linux Kernel and today Linus Torvalds has obliged, [announcing the immediate availability of Linux 3.18][1].
|
||||
|
||||
Posted on the Linux Kernel Mailing List, Torvalds explains that while a few niggling issues persist in 3.17 for a small number of users, there was ‘**absolutely no point in having everybody else twiddling their thumbs when a couple of people are actively trying to bisect an older issue**’.
|
||||
|
||||
### What’s New In Linux 3.18? ###
|
||||
|
||||
The Linux 3.18 kernel is amped up with some of the latest improvements in hardware support, power efficiency, bug fixes and reliability.
|
||||
|
||||
As ever, these span the breadth of comprehension, going from bamboozling — e.g., multi buffer operations for cryptographic layers — to the air-punchingly understandable, like support for the Razer Sabertooth gamepad.
|
||||
|
||||
We’ve compiling some of the notable changes made in this release below. It’s far, far, far from being exhaustive, and cherry picks the more relatable.
|
||||
|
||||
- Nouveau (free Nvidia GPU driver) now supports basic DisplayPort audio
|
||||
- Support for the Razer Sabertooth gamepad, maps it as Xbox 360 controller
|
||||
- Xilinx USB2 peripherals
|
||||
- Touchscreen support for Microchip AR1021 i2c, PenMount 6000 touch
|
||||
- Audio codecs: Cirrus Logic CS35L32, Everest ES8328and Freescale ES8328
|
||||
- Audio support: Generic Freescale sound cards, Analog Devices SSM4567 audio amplifier
|
||||
- Various filesystem improvements, including Btrfs and F2FS
|
||||
- DCTCP congestion control algorithm now supported
|
||||
- JIT compilation of eBPF programs on 64-bit builds
|
||||
- “Tinification” patches to help developers compile leaner, smaller kernels
|
||||
|
||||
#### Installing Linux 3.18 on Ubuntu ####
|
||||
|
||||
Although classed as stable and bringing numerous new changes to the table, don’t feel in a rush to try and upgrade your own OS to it anytime soon. Unless you’re adept at handling the sort of monitor-smashing, CPU-charring, rage-inducing issues that arise from swapping out the engine in your OS motor, you shouldn’t.
|
||||
|
||||
If you insist, you’ll find source packages available at the kernel.org website.
|
||||
|
||||
- [Download the Linux Kernel Source Packages][2]
|
||||
|
||||
A mainline kernel archive is maintained by Canonical to provide builds of newer Linux kernels for use by Ubuntu developers. But, and you really should note this, these are not intended for end users, despite what you may read elsewhere. With no guarantee or support, use at your own risk.
|
||||
|
||||
- [Visit the Ubuntu Kernel Mainline Archive][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/12/linux-kernel-3-18-released-whats-new
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:https://lkml.org/lkml/2014/12/7/202
|
||||
[2]:https://www.kernel.org/pub/linux/kernel/v3.x/
|
||||
[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D
|
@ -1,3 +1,4 @@
|
||||
(translating by runningwater)
|
||||
How To Create A Bootable Ubuntu USB Drive For Mac In OS X
|
||||
================================================================================
|
||||

|
||||
@ -133,7 +134,7 @@ I hope this guide helped you to create a bootable USB disk of Ubuntu for Mac in
|
||||
via: http://itsfoss.com/create-bootable-ubuntu-usb-drive-mac-os/
|
||||
|
||||
作者:[Abhishek][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
译者:[runningwater](https://github.com/runningwater)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
@ -1,155 +0,0 @@
|
||||
What is a good free control panel for VPS
|
||||
================================================================================
|
||||
Anyone with a reasonable level of Linux skills knows that no control panel can beat the plain-old command line interface for managing a [virtual private server][1] (VPS). One can still argue that there is a place for a good server control panel though, due to the streamlined interface for getting routine administration tasks done easily with a few mouse clicks.
|
||||
|
||||
As far as control panels are concerned, even with the feature-rich commercial control panels with all the bells and whistles, there are viable free open-source alternatives which can be as powerful and versatile. Standing out among them is [Ajenti][2] server administration panel.
|
||||
|
||||
Ajenti allows you to easily configure a variety of common server programs such as Apache/nginx, Samba, BIND, Squid, MySQL, cron, firewall, and so on, making it a great time saver for administering common VPS instances. For production environments, Ajenti also offers add-ons and platform support for virtual web hosting management and custom web UI development.
|
||||
|
||||
Ajenti comes with a [dual license][3]; It is free to use (AGPLv3) for your personal servers, a company's internal hardware boxes, or educational institutions. However, if you are a hosting company or a hardware vendor, you need to purchase a commercial license to use Ajenti as part of commercial offerings.
|
||||
|
||||
### Install Ajenti on Linux ###
|
||||
|
||||
For easy of installation, Ajenti offers its own repository for major Linux distros. All it takes to install Ajenti on Linux is to configure a target repository and install it with a default package manager.
|
||||
|
||||
Upon installation, a RSA private key and certificate will be automatically generated for SSL, and Ajenti will listen on HTTPS port 8000 for secure web access. If you are using firewall, you need to allow TCP/8000 port in the firewall. For security, it is a good idea to block access to port 8000 by default, and add only selected few IP addresses to the white list.
|
||||
|
||||
#### Install Ajenti on Debian ####
|
||||
|
||||
$ wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add -
|
||||
$ sudo sh -c 'echo "deb http://repo.ajenti.org/debian main main debian" >> /etc/apt/sources.list'
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install ajenti
|
||||
|
||||
#### Install Ajenti on Ubuntu ####
|
||||
|
||||
$ wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add -
|
||||
$ sudo sh -c 'echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list'
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install ajenti
|
||||
|
||||
#### Install Ajenti on CentOS/RHEL or Fedora ####
|
||||
|
||||
On CentOS/RHEL, [configure][4] EPEL repository first, and then run the following. On Fedora, use the following commands directly.
|
||||
|
||||
$ wget http://repo.ajenti.org/ajenti-repo-1.0-1.noarch.rpm
|
||||
$ sudo rpm -ivh ajenti-repo-1.0-1.noarch.rpm
|
||||
$ sudo yum install ajenti
|
||||
|
||||
Next, configure the firewall.
|
||||
|
||||
On Fedora or CentOS/RHEL 7:
|
||||
|
||||
$ sudo firewall-cmd --zone=public --add-port=8000/tcp --permanent
|
||||
$ sudo firewall-cmd --reload
|
||||
|
||||
On CentOS/RHEL 6:
|
||||
|
||||
$ sudo iptables -I INPUT -p tcp -m tcp --dport 8000 -j ACCEPT
|
||||
$ sudo service iptables save
|
||||
|
||||
### Access Ajenti Web Interface ###
|
||||
|
||||
Before accessing Ajenti's web interface, make sure to start ajenti service.
|
||||
|
||||
$ sudo service ajenti restart
|
||||
|
||||
Direct your web browser to https://<server-ip-address>:8000, and you will see the following Ajenti login interface.
|
||||
|
||||

|
||||
|
||||
The default login credential is "root" for username and "admin" for password. Once you log in, you will see the initial Ajengi menu.
|
||||
|
||||

|
||||
|
||||
Under "SOFTWARE" section in the left panel, you will see a list of installed services. When you install any new server software supported by Ajenti, the software will be automatically added to the list once you restart ajenti service.
|
||||
|
||||
$ sudo service ajenti restart
|
||||
|
||||
### VPS Management via Ajenti Web Interface ###
|
||||
|
||||
Ajenti's web interface is extremely intuitive and easy to use. Here are a few examples of Ajenti functionality.
|
||||
|
||||
#### Pluggable Architecture ####
|
||||
|
||||
Ajenti comes with a number of application-specific plugins, which makes Ajenti highly extensible. When you install a new software on your VPS, a corresponding Ajenti plugin (if any) will be automatically enabled to manage the software. The "Plugins" menu will show what plugins are available/enabled, and which plugin is associated with what software.
|
||||
|
||||

|
||||
|
||||
#### Package Management ####
|
||||
|
||||
Ajenti offers a web interface for installing and upgrading packages on VPS.
|
||||
|
||||

|
||||
|
||||
#### Firewall Configuration ####
|
||||
|
||||
Ajenti allows you to manage firewall rules (iptables or CSF) in two ways. One is to use a user-friendly web panel interface, and the other is to edit raw firewall rules directly.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
#### Log Inspection ####
|
||||
|
||||
You can browse system logs in /var/log via Ajenti's web interface.
|
||||
|
||||

|
||||
|
||||
#### Process Monitoring ####
|
||||
|
||||
You can see a list of processes sorted by CPU or RAM usage, and can kill them as needed.
|
||||
|
||||

|
||||
|
||||
#### Terminal Access ####
|
||||
|
||||
For low-level VPS access, Ajenti offers a web-based terminal interface where you can type Linux commands. You can open multiple terminal tabs within a web panel as shown below.
|
||||
|
||||

|
||||
|
||||
#### Apache Web Server Administration ####
|
||||
|
||||
You can edit Apache configuration file, and manage apache2 service.
|
||||
|
||||

|
||||
|
||||
#### MySQL/MariaDB Management ####
|
||||
|
||||
You can access MySQL/MariaDB server and execute raw SQL commands on it.
|
||||
|
||||

|
||||
|
||||
#### Squid Configuration ####
|
||||
|
||||
You can configure ACL, HTTP access rules, filtering ports for Squid proxy server.
|
||||
|
||||

|
||||
|
||||
#### Startup Service Management ####
|
||||
|
||||
You can view, start, stop and restart installed services.
|
||||
|
||||

|
||||
|
||||
### Conclusion ###
|
||||
|
||||
Ajenti is a convenient and easy-to-use web control panel for common server administration, with the possibility to add [custom plugins][5] that you can develop. However, remember that any good control panel does not obviate the need for you to learn what's happening behind the scene on your [VPS][6]. A control panel will become a real time saver only when you fully understand what you are doing, and be able to handle the consequence of your action without relying on the control panel.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/free-control-panel-for-vps.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/nanni
|
||||
[1]:http://xmodulo.com/go/digitalocean
|
||||
[2]:http://ajenti.org/
|
||||
[3]:http://ajenti.org/licensing
|
||||
[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html
|
||||
[5]:http://docs.ajenti.org/en/latest/dev/intro.html
|
||||
[6]:http://xmodulo.com/go/digitalocean
|
@ -1,149 +0,0 @@
|
||||
How to use Evernote from the command line on Linux
|
||||
================================================================================
|
||||
This week let's continue our journey into the depth of the Linux command line to manage and organize information. After managing [your personal expenses][1] from the command line, I propose you to manage your notes from the command line, in particular, when your notes are stored in Evernote. In case you have never heard about it, [Evernote][2] specializes in a user-friendly online service for note-taking with cloud synchronization across multiple devices. Besides offering fancy web-based APIs, Evernote has released Evernote clients for Windows, Mac, [Android][3] and iOS. However, there is, up to today, no official Linux client available. Hopefully, among the plethora of unofficial Linux programs, one emerges and attracts all the command line warriors that we are: [Geeknote][4]
|
||||
|
||||
### Installation of Geeknote ###
|
||||
|
||||
Geeknote is developed in Python. So before trying anything, make sure that you have Python (version 2.7 preferably) and git installed.
|
||||
|
||||
#### Debian, Ubuntu and Linux Mint ####
|
||||
|
||||
$ sudo apt-get install python2.7 git python-setuptools
|
||||
$ git clone git://github.com/VitaliyRodnenko/geeknote.git
|
||||
$ cd geeknote
|
||||
$ sudo python2.7 setup.py install
|
||||
|
||||
#### Fedora or CentOS/RHEL ####
|
||||
|
||||
$ sudo yum install git
|
||||
$ git clone git://github.com/VitaliyRodnenko/geeknote.git
|
||||
$ cd geeknote
|
||||
$ sudo python setup.py install
|
||||
|
||||
#### Arch Linux ####
|
||||
|
||||
For Arch Linux users, just use the package from the [AUR][5].
|
||||
|
||||
### Basic Usage of Geeknote ###
|
||||
|
||||
Once you installed Geeknote, you should link Geeknote with your Evernote account with:
|
||||
|
||||
$ geeknote login
|
||||
|
||||
Then enter your email address, your password, and your two-factor authentication code. If you do not have the latter, just ignore it and press ENTER.
|
||||
|
||||

|
||||
|
||||
Obviously you need an Evernote account to do all of this, so go register first.
|
||||
|
||||
Once you are all set and ready, you can start playing around, creating new notes and editing them.
|
||||
|
||||
But first, you should set your favorite text editor with:
|
||||
|
||||
$ geeknote settings --editor vim
|
||||
|
||||
Then, the general syntax to create a new note is:
|
||||
|
||||
$ geeknote create --title [title of the new note] (--content [content] --tags [comma-separated tags] --notebook [comma-separated notebooks])
|
||||
|
||||
In the above, only the title field is required, which corresponds to the title of the new note. The other flags serve to add additional metadata for the note: add some tag(s) as relevant keywords for your note, and specify in which notebook(s) to place the note. Also, if your title or content contain spaces, don't forget to place them in quotation marks.
|
||||
|
||||
For example:
|
||||
|
||||
$ geeknote create --title "My note" --content "This is a test note" --tags "finance, business, important" --notebook "Family"
|
||||
|
||||
Naturally, the next step is to edit your notes. The syntax is very similar:
|
||||
|
||||
$ geeknote edit --note [title of the note to edit] (--title [new title] --tags [new tags] --notebook [new notebooks])
|
||||
|
||||
Note that the optional parameters such as title, tags, and notebook, serve to modify the metadata of the note. For example, you can rename a note with:
|
||||
|
||||
$ geeknote edit --note [old title] --title [new title]
|
||||
|
||||
Now that the basis of creating and editing is done, the more advanced features are search and deletion. You can search through your notes with the syntax:
|
||||
|
||||
$ geeknote find --search [text-to-search] --tags [comma-separated tags] --notebook [comma-separated notebooks] --date [date-or-date-range] --content-search
|
||||
|
||||
By default, the above command will search notes by their titles. With "--content-search" option, it will search notes by their content.
|
||||
|
||||
For example:
|
||||
|
||||
$ geeknote find --search "*restaurant" --notebooks "Family" --date 31.03.2014-31.08.2014
|
||||
|
||||
Show all the notes with a specific title by running:
|
||||
|
||||
$ geeknote show [title]
|
||||
|
||||

|
||||
|
||||
My favorite trick though is probably to use:
|
||||
|
||||
$ geeknote show "*"
|
||||
|
||||
which will display all your notes and allow you to chose one in particular.
|
||||
|
||||
And remove a note with:
|
||||
|
||||
$ geeknote remove --note [title]
|
||||
|
||||
Be careful as this is a real removal. It will delete the note from your cloud storage.
|
||||
|
||||
Finally, there are a lot of options to manage tags and notebooks. I think that the most useful one is probably to display the list of notebooks.
|
||||
|
||||
$ geeknote notebook-list
|
||||
|
||||

|
||||
|
||||
From there, everything is pretty similar. As you can guess, listing all your tags is via:
|
||||
|
||||
$ geeknote tag-list
|
||||
|
||||
Creating a notebook is done via:
|
||||
|
||||
$ geeknote notebook-create --title [notebook title]
|
||||
|
||||
While creating a tag is:
|
||||
|
||||
$ geeknote tag-create --title [tag title]
|
||||
|
||||
Once you get the hang of it, the syntax is really coherent and clear, which is very appreciable.
|
||||
|
||||
If you still want more, don't forget to go checkout the [official documentation][6].
|
||||
|
||||
### Bonus ###
|
||||
|
||||
As a bonus, Geeknote comes with the utility gnsync, which allows for file synchronization between your Evernote account and your local computer. However, I find its syntax a bit dry:
|
||||
|
||||
$ gnsync --path [where to sync] (--mask [what kind of file to sync] --format [in which format] --logpath [where to write the log] --notebook [which notebook to use])
|
||||
|
||||
What all of this means is the following.
|
||||
|
||||
|
||||
- **--path /home/adrien/Documents/notes/**: location of note files to synchronize with Evernote.
|
||||
- **--mask "*.txt"**: synchronize only plain text files. By default, gnsync will try to sync every file.
|
||||
- **--format markdown**: whether you want them as plain or markdown format (the default is plain).
|
||||
- **--logpath /home/adrien/gnsync.log**: where to write the log for synchronization. In case it goes wrong, gnsync will write logging information there.
|
||||
- **--notebook "Family"**: in which notebook to synchronize note files. Note that if you leave it empty, a new notebook named after your synced folder will be created.
|
||||
|
||||
To conclude, Geeknote is a fancy little command-line client for Evernote. I personally don't use Evernote that much, but it remains pretty nice and useful. The command line aspect makes it both geeky and easy to combine with a shell script of some sort. Also, there exists a fork program of Geeknote on Git, named [geeknote-improved-git][7] in Archlinux AUR, which pretends to have a few more features and a more active development than the other branch. From what I could see, it is really worth taking a look at.
|
||||
|
||||
What do you think of Geeknote? Is it something you would consider using? Or would you rather stick to the traditional applications? Let us know in the comments.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/evernote-command-line-linux.html
|
||||
|
||||
作者:[Adrien Brochard][a]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/adrien
|
||||
[1]:http://xmodulo.com/manage-personal-expenses-command-line.html
|
||||
[2]:https://evernote.com/
|
||||
[3]:http://xmodulo.com/go/android_tutorial
|
||||
[4]:http://www.geeknote.me/
|
||||
[5]:https://aur.archlinux.org/packages/geeknote-git/
|
||||
[6]:http://www.geeknote.me/documentation/
|
||||
[7]:https://aur.archlinux.org/packages/geeknote-improved-git/
|
@ -0,0 +1,54 @@
|
||||
、Linux 3.18 内核发布了,下面的是更新的内容
|
||||
================================================================================
|
||||

|
||||
|
||||
新的一月意味着新的稳定版Linux内核的发布,今天Linus Torvalds[宣布Linux 3.18 很快就会发布了][1]。
|
||||
|
||||
Torvalds在Linux内核邮件列表中解释到,由于在3.17中还存在几个令一小部分用户烦心的问题,‘**绝不可以在一些人积极解决老问题时其他人无所事事。**’
|
||||
|
||||
### Linux 3.18中有什么新的? ###
|
||||
|
||||
Linux 3.18内核主要致力于硬件支持、电源效率、bug修复和可靠性。
|
||||
|
||||
如往常一样,这些内容跨越很大,容易让人迷惑 。比如:加密层多重缓冲操作 - 到气冲感知, 就像对雷蛇游戏手柄的支持。
|
||||
|
||||
下面我们收集了这个版本的重要的改变。这远远不是所有的,只是选取了一些更相关的内容。
|
||||
|
||||
|
||||
- Nouveau (免费 Nvidia GPU 驱动) 现在支持基础 DisplayPort 音频
|
||||
- 对雷蛇游戏手柄的支持,用在Xbox 360上
|
||||
- Xilinx USB2 外设
|
||||
- 对Microchip AR1021 i2c、PenMount 6000 touch的触摸屏支持。
|
||||
- 音频编码: Cirrus Logic CS35L32、 Everest ES8328and Freescale ES8328
|
||||
- 音频支持: 通用飞思卡尔声卡, A模拟SSM4567音频放大器
|
||||
- 不同的文件系统提升, 包括 Btrfs 和 F2FS
|
||||
- 现在支持了DCTCP拥塞控制算法
|
||||
- JIT 编译64位 eBPF程序
|
||||
- “Tinification” 帮助开发人员编译更精简更小的内核
|
||||
|
||||
#### 在Ubuntu上安装 Linux 3.18 ####
|
||||
|
||||
虽然声称是稳定版并带来了大量的更新,但不要马上急着升级你的系统。除非你擅长处理监控异常,CPU过热、和其他各种系统报出的异常。
|
||||
|
||||
如果你坚持更新,你可以在kernel.org网站上找到源码包。
|
||||
|
||||
- [下载Linux内核源码包][2]
|
||||
|
||||
有一个由Canonical维护的最新Linux内核归档。尽管你可能在其他地方看到过,但是,请注意,这不是针对终端用户的。没有任何保证与支持,你自己承担风险。
|
||||
|
||||
- [访问Ubuntu内核主线归档][3]
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://www.omgubuntu.co.uk/2014/12/linux-kernel-3-18-released-whats-new
|
||||
|
||||
作者:[Joey-Elijah Sneddon][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:https://plus.google.com/117485690627814051450/?rel=author
|
||||
[1]:https://lkml.org/lkml/2014/12/7/202
|
||||
[2]:https://www.kernel.org/pub/linux/kernel/v3.x/
|
||||
[3]:http://kernel.ubuntu.com/~kernel-ppa/mainline/?C=N;O=D
|
@ -0,0 +1,155 @@
|
||||
VPS上好的控制面板是什么
|
||||
================================================================================
|
||||
任何有经验的Linux人员都认为没有一款控制面板可以打败纯命令行界面来管理[虚拟主机][1](VPS)。也有人争论有一款好的面板的一席之地,因为流线型的界面让常规管理操作可以通过点几下鼠标就可以完成。
|
||||
|
||||
至于控制面板,有共恩那个强大的充满警铃和汽笛的商业控制面板,也有不同免费的但也强大多功能的免费开源面板替代。这之中杰出的代表是[Ajenti][2]控制面板。
|
||||
|
||||
Ajenti可以让你很简单地配置不同的通用服务程序,如Apache/nginx、Samba、BIND、Squid、MySQL、cron、防火墙等等,对管理通用VPS实例可以节省大量的时间。对于生产环境,Ajenti同样提供了插件和平台来支持虚拟web主机管理和自定义web UI开发。
|
||||
|
||||
Ajenti有[双重授权][3];一个是个人、企业内部或者教育用途免费使用的AGPLv3。然而,如果你是一家托管企业或者硬件提供商,那么你需要购买商业授权来使用Ajenti作为商业供应。
|
||||
|
||||
### 在Linux上安装Ajenti ###
|
||||
|
||||
为了简化安装,Ajenti为主流Linux发行版提供了自己的仓库。安装Ajenti要做的就是配置目标仓库,并用默认包管理器来安装。
|
||||
|
||||
安装前,一个RSA密钥和证书会生成用于SSL,Ajenti会见在8000端口监听HTTPS的web请求。如果你正在使用防火墙,你需要在防火墙中允许8000端口。为了安全,最好默认禁止8000端口的访问,并添加少数IP地址到白名单中。
|
||||
|
||||
#### 在Debian上安装Ajenti ####
|
||||
|
||||
$ wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add -
|
||||
$ sudo sh -c 'echo "deb http://repo.ajenti.org/debian main main debian" >> /etc/apt/sources.list'
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install ajenti
|
||||
|
||||
#### 在Ubuntu上安装Ajenti ####
|
||||
|
||||
$ wget http://repo.ajenti.org/debian/key -O- | sudo apt-key add -
|
||||
$ sudo sh -c 'echo "deb http://repo.ajenti.org/ng/debian main main ubuntu" >> /etc/apt/sources.list'
|
||||
$ sudo apt-get update
|
||||
$ sudo apt-get install ajenti
|
||||
|
||||
#### 在 CentOS/RHEL或者Fedora上安装Ajenti ####
|
||||
|
||||
在CentOS/RHEL上,首先[配置][4]EPEL仓库,接着运行下面的命令。在Fedora上,直接使用下面的命令。
|
||||
|
||||
$ wget http://repo.ajenti.org/ajenti-repo-1.0-1.noarch.rpm
|
||||
$ sudo rpm -ivh ajenti-repo-1.0-1.noarch.rpm
|
||||
$ sudo yum install ajenti
|
||||
|
||||
接着配置防火墙。
|
||||
|
||||
在Fedora或者CentOS/RHEL 7上:
|
||||
|
||||
$ sudo firewall-cmd --zone=public --add-port=8000/tcp --permanent
|
||||
$ sudo firewall-cmd --reload
|
||||
|
||||
在CentOS/RHEL 6上:
|
||||
|
||||
$ sudo iptables -I INPUT -p tcp -m tcp --dport 8000 -j ACCEPT
|
||||
$ sudo service iptables save
|
||||
|
||||
### 访问Ajenti web界面 ###
|
||||
|
||||
在访问Ajenti的web界面前,先确保启动了ajenti服务。
|
||||
|
||||
$ sudo service ajenti restart
|
||||
|
||||
直接在浏览器中输入https://<server-ip-address>:8000,你就会看到下面的Ajenti的登录界面。
|
||||
|
||||

|
||||
|
||||
默认的登录凭证是用户名“root”,密码“admin”。当你登录后,你会看到初始化的Ajenti菜单。
|
||||
|
||||

|
||||
|
||||
在左边面板的"SOFTWARE"选项下,你会看接一列安装的服务。当你安装了任何Ajenti支持的服务端程序时,软件会在重启ajenti服务后被自动加入列表。
|
||||
|
||||
$ sudo service ajenti restart
|
||||
|
||||
### 通过Ajenti web界面管理VPS ###
|
||||
|
||||
Ajenti的web界面非常直观且易使用。下面是Ajenti功能的几个例子。
|
||||
|
||||
#### 可插入结构 ####
|
||||
|
||||
Ajenti有许多特定应用的插件,这让AJenti可高度扩展化。当你在VPS上安装一款新软件时。相关的AJenti插件(如果有的话)会自动启用来管理软件。“Plugins”菜单会展示可用/启用的插件,以及和它们关联的软件。
|
||||
|
||||

|
||||
|
||||
#### 包管理 ####
|
||||
|
||||
Ajenti提供了一个web界面来安装和升级VPS上的包。
|
||||
|
||||

|
||||
|
||||
#### 防火墙配置 ####
|
||||
|
||||
Ajenti允许你用两种方法管理防火墙规则(iptables或者CSF)。一种是使用用户友好的web面板,另一种是直接编辑原生的防火墙规则。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
#### 日志检查 ####
|
||||
|
||||
你可以在Ajenti的web界面中浏览位于/var/log下的系统日志。
|
||||
|
||||

|
||||
|
||||
#### 进程监控 ####
|
||||
|
||||
你可以u看见按照CPU和内存使用率排序的进程列表,按需可以结束它们。
|
||||
|
||||

|
||||
|
||||
#### 终端访问 ####
|
||||
|
||||
对于底层VPS访问,Ajenti提供了基于web的终端界面,你在这可以输入Linux命令。你也可以像下面那样在一个面板中打开多个终端。
|
||||
|
||||

|
||||
|
||||
#### Apache Web服务管理 ####
|
||||
|
||||
你可以编辑Apache配额文件,并管理apche2服务。
|
||||
|
||||

|
||||
|
||||
#### MySQL/MariaDB 管理 ####
|
||||
|
||||
你可以访问MySQL/MariaDB服务并直接在上面执行原生SQL命令。
|
||||
|
||||

|
||||
|
||||
#### Squid 配置 ####
|
||||
|
||||
你可以配置Squid代理服务器的ACL、HTTP访问规则,过滤端口。
|
||||
|
||||

|
||||
|
||||
#### 启动服务管理 ####
|
||||
|
||||
你可以浏览、启动、停止、重启安装的服务。
|
||||
|
||||

|
||||
|
||||
### 总结 ###
|
||||
|
||||
Ajenti是一款易于使用的服务器管理控制面板,可以加入你开发的[自定义插件][5]。然而,记住任何好的控制面板都不会排除你学习面板后[VPS][6]上发生的情况的需求。一款面板会在你完全了解你正在做的事情的时候成会一款真正节省时间的利器,并且不依赖于控制面版来处理你行动的结果。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/free-control-panel-for-vps.html
|
||||
|
||||
作者:[Dan Nanni][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/nanni
|
||||
[1]:http://xmodulo.com/go/digitalocean
|
||||
[2]:http://ajenti.org/
|
||||
[3]:http://ajenti.org/licensing
|
||||
[4]:http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html
|
||||
[5]:http://docs.ajenti.org/en/latest/dev/intro.html
|
||||
[6]:http://xmodulo.com/go/digitalocean
|
@ -0,0 +1,151 @@
|
||||
如何在Linux的命令行中使用Evernote
|
||||
================================================================================
|
||||
这周让我们继续什么学习如个使用Linux命令行管理和组织信息。在命令行中管理[你的个人花费][1]后,我建议你在命令行中管理你的笔记,特别地是,当你笔记放在Evernote中时。为防止你从来没有听说过,[Evernote][2]专门有一个用户有好的在线服务用来在不同的设备间同步笔记。除了提供花哨的基于Web的API,Evernote还发布了在Windows、Mac、[Android][3]和iOS上的客户端。然而至今还没有官方的Linux客户端可用。老实说在众多的非官方Linux程序中,一个程序一出现就吸引了所有的命令行爱好者:[Geeknote][4]
|
||||
|
||||
### Geeknote 的安装 ###
|
||||
|
||||
Geeknote使用Python开发的。因此,在开始之前请确保你已经安装了Python(最好是2.7的版本)和git。
|
||||
|
||||
#### 在 Debian、 Ubuntu 和 Linux Mint 中 ####
|
||||
|
||||
$ sudo apt-get install python2.7 git python-setuptools
|
||||
$ git clone git://github.com/VitaliyRodnenko/geeknote.git
|
||||
$ cd geeknote
|
||||
$ sudo python2.7 setup.py install
|
||||
|
||||
#### 在 Fedora 或者 CentOS/RHEL 中 ####
|
||||
|
||||
$ sudo yum install git
|
||||
$ git clone git://github.com/VitaliyRodnenko/geeknote.git
|
||||
$ cd geeknote
|
||||
$ sudo python setup.py install
|
||||
|
||||
#### 在 Arch Linux 中 ####
|
||||
|
||||
对于ArchLinux用户,只需要使用[AUR][5]中的包。
|
||||
|
||||
### Geeknote 的基本使用 ###
|
||||
|
||||
一旦你安装玩Geeknote后,你应该将Geeknote与你的Evernote账号关联:
|
||||
|
||||
$ geeknote login
|
||||
|
||||
接着输入你的emial地址、密码、和你的二步验证码。如果你没有后者,忽略它并按下回车。
|
||||
|
||||

|
||||
|
||||
很明显,你需要一个Evernote账号来完成这些,因此先去注册。
|
||||
|
||||
一旦完成这一切之后,你就可以开始了,创建新的笔记并编辑它们。
|
||||
|
||||
但是首先,你需要设置你最喜欢的文本编辑器:
|
||||
|
||||
$ geeknote settings --editor vim
|
||||
|
||||
接着,常规创建一条新笔记的语法是:
|
||||
|
||||
$ geeknote create --title [title of the new note] (--content [content] --tags [comma-separated tags] --notebook [comma-separated notebooks])
|
||||
|
||||
上面的命令中,只有‘title’是必须的,它会与一条新笔记的标题相关联。其他的标注可以为笔记添加额外的元数据:添加标签来与你的笔记关联、指定放在那个笔记本里。同样,如果你的标题或者内容还有空格,不要忘记将它们放在引号中。
|
||||
|
||||
|
||||
比如:
|
||||
|
||||
$ geeknote create --title "My note" --content "This is a test note" --tags "finance, business, important" --notebook "Family"
|
||||
|
||||
通常上,下一步就是编辑你的笔记。语法很相似:
|
||||
|
||||
$ geeknote edit --note [title of the note to edit] (--title [new title] --tags [new tags] --notebook [new notebooks])
|
||||
|
||||
注意可选的参数如标题、标签和笔记本,用来修改笔记的元数据。比如,你可以用下面的命令重命名笔记:
|
||||
|
||||
$ geeknote edit --note [old title] --title [new title]
|
||||
|
||||
现在基本的创建和编辑已经完成了,更高级的特性是搜索和删除。你可以下面的语法搜索你的笔记:
|
||||
|
||||
$ geeknote find --search [text-to-search] --tags [comma-separated tags] --notebook [comma-separated notebooks] --date [date-or-date-range] --content-search
|
||||
|
||||
默认上,上面的命令会通过标题搜索笔记。 用"--content-search"选项,就可以搜索它们的内容。
|
||||
|
||||
比如:
|
||||
|
||||
$ geeknote find --search "*restaurant" --notebooks "Family" --date 31.03.2014-31.08.2014
|
||||
|
||||
显示制定标题的笔记:
|
||||
|
||||
$ geeknote show [title]
|
||||
|
||||

|
||||
|
||||
我最喜欢使用的一个技巧是使用:
|
||||
|
||||
$ geeknote show "*"
|
||||
|
||||
这会显示所有的笔记并允许你在这中选择一个。
|
||||
|
||||
删除一条笔记:
|
||||
|
||||
$ geeknote remove --note [title]
|
||||
|
||||
小心这是真正的删除。它会从云存储中删除这条笔记。
|
||||
|
||||
最后有很多的选项来管理标签和笔记本。我想最有用的是显示笔记本列表。
|
||||
|
||||
$ geeknote notebook-list
|
||||
|
||||

|
||||
|
||||
下面的非常相像。你可以猜到,可以用下面的命令列出所有的标签:
|
||||
|
||||
$ geeknote tag-list
|
||||
|
||||
创建一个笔记本:
|
||||
|
||||
$ geeknote notebook-create --title [notebook title]
|
||||
|
||||
创建一个标签:
|
||||
|
||||
$ geeknote tag-create --title [tag title]
|
||||
|
||||
一旦你了解了窍门,很明显语法是非常连贯且明确的。
|
||||
|
||||
如果你想要了解更多,不要忘记查看[官方文档][6]。
|
||||
|
||||
### 福利 ###
|
||||
|
||||
As a bonus, Geeknote comes with the utility gnsync, which allows for file synchronization between your Evernote account and your local computer. However, I find its syntax a bit dry:
|
||||
福利的是,Geeknote自带的gnsync工具可以让你在Evernote和本地计算机之间同步。然而,我发现它的语法有点枯燥:
|
||||
|
||||
$ gnsync --path [where to sync] (--mask [what kind of file to sync] --format [in which format] --logpath [where to write the log] --notebook [which notebook to use])
|
||||
|
||||
下面是这些的意义。
|
||||
|
||||
|
||||
- **--path /home/adrien/Documents/notes/**: 与Evernote同步笔记的位置。
|
||||
- **--mask "*.txt"**: 只同步纯文本文件。默认上,gnsync会尝试同步所有文件。
|
||||
- **--format markdown**: 你希望它们是纯文本或者markdown格式(默认是纯文本)。
|
||||
- **--logpath /home/adrien/gnsync.log**: 同步日志的位置。为防出错,gnsync会在那里写入日志信息。
|
||||
- **--notebook "Family"**: 同步哪个笔记本中的笔记。如果你那里留空,程序会创建一个以你同步文件夹命令的笔记本。
|
||||
|
||||
总结来说,Geeknote是一款花哨的Evernote的命令行客户端。我个人不常使用Evernote,但它仍然很漂亮和有用。命令行一方面让它变得很极客且很容易与shell脚本结合。同样,还有Git上fork出来的Geeknote,在ArchLinux AUR上称为[geeknote-improved-git][7],貌似它有更多的特性和比其他分支更积极的开发。但在我看来,还很值得再看看。
|
||||
|
||||
你认为Geeknote怎么样? 有什么你想用的么?或者你更喜欢使用传统的程序?在评论区中让我们知道。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://xmodulo.com/evernote-command-line-linux.html
|
||||
|
||||
作者:[Adrien Brochard][a]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
||||
|
||||
[a]:http://xmodulo.com/author/adrien
|
||||
[1]:http://xmodulo.com/manage-personal-expenses-command-line.html
|
||||
[2]:https://evernote.com/
|
||||
[3]:http://xmodulo.com/go/android_tutorial
|
||||
[4]:http://www.geeknote.me/
|
||||
[5]:https://aur.archlinux.org/packages/geeknote-git/
|
||||
[6]:http://www.geeknote.me/documentation/
|
||||
[7]:https://aur.archlinux.org/packages/geeknote-improved-git/
|
Loading…
Reference in New Issue
Block a user