mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-02-28 01:01:09 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
ef8426a592
@ -1,17 +1,20 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: (HankChow)
|
[#]: translator: (HankChow)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: (wxy)
|
||||||
[#]: publisher: ( )
|
[#]: publisher: (wxy)
|
||||||
[#]: url: ( )
|
[#]: url: (https://linux.cn/article-10587-1.html)
|
||||||
[#]: subject: (And, Ampersand, and & in Linux)
|
[#]: subject: (And, Ampersand, and & in Linux)
|
||||||
[#]: via: (https://www.linux.com/blog/learn/2019/2/and-ampersand-and-linux)
|
[#]: via: (https://www.linux.com/blog/learn/2019/2/and-ampersand-and-linux)
|
||||||
[#]: author: (Paul Brown https://www.linux.com/users/bro66)
|
[#]: author: (Paul Brown https://www.linux.com/users/bro66)
|
||||||
|
|
||||||
Linux 中的 &
|
Linux 中的 &
|
||||||
======
|
======
|
||||||
|
|
||||||
|
> 这篇文章将了解一下 & 符号及它在 Linux 命令行中的各种用法。
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
如果阅读过我之前的[三][1][篇][2][文章][3],你会觉得掌握连接各个命令之间的连接符号用法也是很重要的。实际上,命令的用法并不难,例如 `mkdir`、`touch` 和 `find` 也分别可以简单概括为“建立新目录”、“更新文件”和“在目录树中查找文件”而已。
|
如果阅读过我之前的三篇文章([1][1]、[2][2]、[3][3]),你会觉得掌握连接各个命令之间的连接符号用法也是很重要的。实际上,命令的用法并不难,例如 `mkdir`、`touch` 和 `find` 也分别可以简单概括为“建立新目录”、“更新文件”和“在目录树中查找文件”而已。
|
||||||
|
|
||||||
但如果要理解
|
但如果要理解
|
||||||
|
|
||||||
@ -23,7 +26,7 @@ mkdir test_dir 2>/dev/null || touch images.txt && find . -iname "*jpg" > backup/
|
|||||||
|
|
||||||
关键之处就在于命令之间的连接符号。掌握了这些符号的用法,不仅可以让你更好理解整体的工作原理,还可以让你知道如何将不同的命令有效地结合起来,提高工作效率。
|
关键之处就在于命令之间的连接符号。掌握了这些符号的用法,不仅可以让你更好理解整体的工作原理,还可以让你知道如何将不同的命令有效地结合起来,提高工作效率。
|
||||||
|
|
||||||
在这一篇文章和下一篇文章中,我会介绍如何使用 `&` 号和管道符号(`|`)在不同场景下的使用方法。
|
在这一篇文章和接下来的文章中,我会介绍如何使用 `&` 号和管道符号(`|`)在不同场景下的使用方法。
|
||||||
|
|
||||||
### 幕后工作
|
### 幕后工作
|
||||||
|
|
||||||
@ -49,34 +52,29 @@ cp -R original/dir/ backup/dir/ &
|
|||||||
|
|
||||||
* `jobs` 命令可以显示当前终端正在运行的进程,包括前台运行和后台运行的进程。它对每个正在执行中的进程任务分配了一个序号(这个序号不是进程 ID),可以使用这些序号来引用各个进程任务。
|
* `jobs` 命令可以显示当前终端正在运行的进程,包括前台运行和后台运行的进程。它对每个正在执行中的进程任务分配了一个序号(这个序号不是进程 ID),可以使用这些序号来引用各个进程任务。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ jobs
|
$ jobs
|
||||||
[1]- Running cp -i -R original/dir/* backup/dir/ &
|
[1]- Running cp -i -R original/dir/* backup/dir/ &
|
||||||
[2]+ Running find . -iname "*jpg" > backup/dir/images.txt &
|
[2]+ Running find . -iname "*jpg" > backup/dir/images.txt &
|
||||||
```
|
```
|
||||||
|
|
||||||
* `fg` 命令可以将后台运行的进程任务放到前台运行,这样可以比较方便地进行交互。根据 `jobs` 命令提供的进程任务序号,再在前面加上 `%` 符号,就可以把相应的进程任务放到前台运行。
|
* `fg` 命令可以将后台运行的进程任务放到前台运行,这样可以比较方便地进行交互。根据 `jobs` 命令提供的进程任务序号,再在前面加上 `%` 符号,就可以把相应的进程任务放到前台运行。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ fg %1 # 将上面序号为 1 的 cp 任务放到前台运行
|
$ fg %1 # 将上面序号为 1 的 cp 任务放到前台运行
|
||||||
cp -i -R original/dir/* backup/dir/
|
cp -i -R original/dir/* backup/dir/
|
||||||
```
|
```
|
||||||
|
如果这个进程任务是暂停状态,`fg` 命令会将它启动起来。
|
||||||
如果这个进程任务是暂停状态,`fg` 命令会将它启动起来。
|
* 使用 `ctrl+z` 组合键可以将前台运行的任务暂停,仅仅是暂停,而不是将任务终止。当使用 `fg` 或者 `bg` 命令将任务重新启动起来的时候,任务会从被暂停的位置开始执行。但 [sleep][4] 命令是一个特例,`sleep` 任务被暂停的时间会计算在 `sleep` 时间之内。因为 `sleep` 命令依据的是系统时钟的时间,而不是实际运行的时间。也就是说,如果运行了 `sleep 30`,然后将任务暂停 30 秒以上,那么任务恢复执行的时候会立即终止并退出。
|
||||||
|
|
||||||
* 使用 `ctrl+z` 组合键可以将前台运行的任务暂停,仅仅是暂停,而不是将任务终止。当使用 `fg` 或者`bg` 命令将任务重新启动起来的时候,任务会从被暂停的位置开始执行。但 [`sleep`][4] 命令是一个特例,`sleep` 任务被暂停的时间会计算在 `sleep` 时间之内。因为 `sleep` 命令依据的是系统时钟的时间,而不是实际运行的时间。也就是说,如果运行了 `sleep 30`,然后将任务暂停 30 秒以上,那么任务恢复执行的时候会立即终止并退出。
|
|
||||||
|
|
||||||
* `bg` 命令会将任务放置到后台执行,如果任务是暂停状态,也会被启动起来。
|
* `bg` 命令会将任务放置到后台执行,如果任务是暂停状态,也会被启动起来。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ bg %1
|
$ bg %1
|
||||||
[1]+ cp -i -R original/dir/* backup/dir/ &
|
[1]+ cp -i -R original/dir/* backup/dir/ &
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
如上所述,以上几个命令只能在同一个终端里才能使用。如果启动进程任务的终端被关闭了,或者切换到了另一个终端,以上几个命令就无法使用了。
|
如上所述,以上几个命令只能在同一个终端里才能使用。如果启动进程任务的终端被关闭了,或者切换到了另一个终端,以上几个命令就无法使用了。
|
||||||
|
|
||||||
如果要在另一个终端管理后台进程,就需要其它工具了。例如可以使用 [`kill`][5] 命令从另一个终端终止某个进程:
|
如果要在另一个终端管理后台进程,就需要其它工具了。例如可以使用 [kill][5] 命令从另一个终端终止某个进程:
|
||||||
|
|
||||||
```
|
```
|
||||||
kill -s STOP <PID>
|
kill -s STOP <PID>
|
||||||
@ -172,18 +170,10 @@ $ pgrep -lx cp
|
|||||||
|
|
||||||
在命令的末尾加上 `&` 可以让我们理解前台进程和后台进程的概念,以及如何管理这些进程。
|
在命令的末尾加上 `&` 可以让我们理解前台进程和后台进程的概念,以及如何管理这些进程。
|
||||||
|
|
||||||
在 UNIX/Linux 术语中,在后台运行的进程被称为 daemon。如果你曾经听说过这个词,那你现在应该知道它的意义了。
|
在 UNIX/Linux 术语中,在后台运行的进程被称为<ruby>守护进程<rt>daemon</rt></ruby>。如果你曾经听说过这个词,那你现在应该知道它的意义了。
|
||||||
|
|
||||||
和其它符号一样,`&` 在命令行中还有很多别的用法。在下一篇文章中,我会更详细地介绍。
|
和其它符号一样,`&` 在命令行中还有很多别的用法。在下一篇文章中,我会更详细地介绍。
|
||||||
|
|
||||||
阅读更多:
|
|
||||||
|
|
||||||
[Linux Tools: The Meaning of Dot][1]
|
|
||||||
|
|
||||||
[Understanding Angle Brackets in Bash][2]
|
|
||||||
|
|
||||||
[More About Angle Brackets in Bash][3]
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
via: https://www.linux.com/blog/learn/2019/2/and-ampersand-and-linux
|
via: https://www.linux.com/blog/learn/2019/2/and-ampersand-and-linux
|
||||||
@ -191,15 +181,15 @@ via: https://www.linux.com/blog/learn/2019/2/and-ampersand-and-linux
|
|||||||
作者:[Paul Brown][a]
|
作者:[Paul Brown][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][b]
|
||||||
译者:[HankChow](https://github.com/HankChow)
|
译者:[HankChow](https://github.com/HankChow)
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
校对:[wxy](https://github.com/wxy)
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
[a]: https://www.linux.com/users/bro66
|
[a]: https://www.linux.com/users/bro66
|
||||||
[b]: https://github.com/lujun9972
|
[b]: https://github.com/lujun9972
|
||||||
[1]: https://www.linux.com/blog/learn/2019/1/linux-tools-meaning-dot
|
[1]: https://linux.cn/article-10465-1.html
|
||||||
[2]: https://www.linux.com/blog/learn/2019/1/understanding-angle-brackets-bash
|
[2]: https://linux.cn/article-10502-1.html
|
||||||
[3]: https://www.linux.com/blog/learn/2019/1/more-about-angle-brackets-bash
|
[3]: https://linux.cn/article-10529-1.html
|
||||||
[4]: https://ss64.com/bash/sleep.html
|
[4]: https://ss64.com/bash/sleep.html
|
||||||
[5]: https://bash.cyberciti.biz/guide/Sending_signal_to_Processes
|
[5]: https://bash.cyberciti.biz/guide/Sending_signal_to_Processes
|
||||||
[6]: https://www.computerhope.com/unix/signals.htm
|
[6]: https://www.computerhope.com/unix/signals.htm
|
@ -1,5 +1,5 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: ( )
|
[#]: translator: (WangYueScream )
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: ( )
|
||||||
[#]: publisher: ( )
|
[#]: publisher: ( )
|
||||||
[#]: url: ( )
|
[#]: url: ( )
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: ( )
|
[#]: translator: (geekpi)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: ( )
|
||||||
[#]: publisher: ( )
|
[#]: publisher: ( )
|
||||||
[#]: url: ( )
|
[#]: url: ( )
|
||||||
|
@ -1,117 +0,0 @@
|
|||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (geekpi)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
[#]: subject: (FinalCrypt – An Open Source File Encryption Application)
|
|
||||||
[#]: via: (https://itsfoss.com/finalcrypt/)
|
|
||||||
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
|
||||||
|
|
||||||
FinalCrypt – An Open Source File Encryption Application
|
|
||||||
======
|
|
||||||
|
|
||||||
I usually don’t encrypt files – but if I am planning to organize my important documents or credentials, an encryption program would come in handy.
|
|
||||||
|
|
||||||
You may be already using a program like [GnuPG][1] that helps you encrypt/decrypt your files on your Linux machine. There is [EncryptPad][2] as well that encrypts your notes.
|
|
||||||
|
|
||||||
However, I have come across a new free and open source encryption tool called FinalCrypt. You can check out their recent releases and the source on its [GitHub page][3].
|
|
||||||
|
|
||||||
In this article, I will be sharing my experience of using this tool. Do note that I won’t be comparing this with any other program available out there – so if you want a detailed comparison between multiple solutions, let us know in the comments.
|
|
||||||
|
|
||||||
![FinalCrypt][4]
|
|
||||||
|
|
||||||
### Using FinalCrypt to encrypt files
|
|
||||||
|
|
||||||
FinalCrypt uses the [One-Time pad][5] key generation cipher to encrypt files. In other words, it generates an OTP key which you will use for encrypting or decrypting your files.
|
|
||||||
|
|
||||||
The key will be completely random as per the size of the key – which you can specify. So, it is impossible to decrypt the file without the key file.
|
|
||||||
|
|
||||||
While the OTP key method for encryption/decryption is simple and effective, but managing or securing the key file could be an inconvenience for some.
|
|
||||||
|
|
||||||
If you want to use FinalCrypt, you can install the DEB/RPM files from its website. FinalCrypt is also available for Windows and macOS.
|
|
||||||
|
|
||||||
Once downloaded, simply double click to [install it from deb][6] or rpm files. You can also build it from the source code if you want.
|
|
||||||
|
|
||||||
### FileCrypt in Action
|
|
||||||
|
|
||||||
This video shows how to use FinalCrypt:
|
|
||||||
|
|
||||||
<https://youtu.be/6Ir8VcZ26E4>
|
|
||||||
|
|
||||||
If you like Linux related videos, please [subscribe to our YouTube channel][7].
|
|
||||||
|
|
||||||
Once you have installed FinalCrypt, you’ll find it in your list of installed applications. Launch it from there.
|
|
||||||
|
|
||||||
Upon launch, you will observe two sections (split) for the items to encrypt/decrypt and the other to select the OTP file.
|
|
||||||
|
|
||||||
![Using FinalCrypt for encrypting files in Linux][8]
|
|
||||||
|
|
||||||
First, you will have to generate an OTP key. Here’s how to do that:
|
|
||||||
|
|
||||||
![finalcrypt otp][9]
|
|
||||||
|
|
||||||
Do note that your file name can be anything – but you need to make sure that the key file size is greater or equal to the file you want to encrypt. I find it absurd but that’s how it is.
|
|
||||||
|
|
||||||
![][10]
|
|
||||||
|
|
||||||
After you generate the file, select the key on the right-side of the window and then select the files that you want to encrypt on the left-side of the window.
|
|
||||||
|
|
||||||
You will find the checksum value, key file size, and valid status highlighted after generating the OTP:
|
|
||||||
|
|
||||||
![][11]
|
|
||||||
|
|
||||||
After making the selection, you just need to click on “ **Encrypt** ” to encrypt those files and if already encrypted, then “ **Decrypt** ” to decrypt those.
|
|
||||||
|
|
||||||
![][12]
|
|
||||||
|
|
||||||
You can also use FinalCrypt in command line to automate your encryption job.
|
|
||||||
|
|
||||||
#### How do you secure your OTP key?
|
|
||||||
|
|
||||||
It is easy to encrypt/decrypt the files you want to protect. But, where should you keep your OTP key?
|
|
||||||
|
|
||||||
It is literally useless if you fail to keep your OTP key in a safe storage location.
|
|
||||||
|
|
||||||
Well, one of the best ways would be to use a USB stick specifically for the keys you want to store. Just plug it in when you want to decrypt files and its all good.
|
|
||||||
|
|
||||||
In addition to that, you may save your key on a [cloud service][13], if you consider it secure enough.
|
|
||||||
|
|
||||||
More information about FinalCrypt can be found on its website.
|
|
||||||
|
|
||||||
[FinalCrypt](https://sites.google.com/site/ronuitholland/home/finalcrypt)
|
|
||||||
|
|
||||||
**Wrapping Up**
|
|
||||||
|
|
||||||
It might seem a little overwhelming at the beginning but it is actually a simple and user-friendly encryption program available for Linux. There are other programs to [password protect folders][14] as well if you are interested in some additional reading.
|
|
||||||
|
|
||||||
What do you think about FinalCrypt? Do you happen to know about something similar which is potentially better? Let us know in the comments and we shall take a look at them!
|
|
||||||
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://itsfoss.com/finalcrypt/
|
|
||||||
|
|
||||||
作者:[Ankush Das][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://itsfoss.com/author/ankush/
|
|
||||||
[b]: https://github.com/lujun9972
|
|
||||||
[1]: https://www.gnupg.org/
|
|
||||||
[2]: https://itsfoss.com/encryptpad-encrypted-text-editor-linux/
|
|
||||||
[3]: https://github.com/ron-from-nl/FinalCrypt
|
|
||||||
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt.png?resize=800%2C450&ssl=1
|
|
||||||
[5]: https://en.wikipedia.org/wiki/One-time_pad
|
|
||||||
[6]: https://itsfoss.com/install-deb-files-ubuntu/
|
|
||||||
[7]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
|
||||||
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt.jpg?fit=800%2C439&ssl=1
|
|
||||||
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt-otp-key.jpg?resize=800%2C443&ssl=1
|
|
||||||
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt-otp-generate.jpg?ssl=1
|
|
||||||
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt-key.jpg?fit=800%2C420&ssl=1
|
|
||||||
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt-encrypt.jpg?ssl=1
|
|
||||||
[13]: https://itsfoss.com/cloud-services-linux/
|
|
||||||
[14]: https://itsfoss.com/password-protect-folder-linux/
|
|
||||||
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt.png?fit=800%2C450&ssl=1
|
|
@ -1,5 +1,5 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: (lujun9972)
|
||||||
[#]: translator: ( )
|
[#]: translator: (HankChow)
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: ( )
|
||||||
[#]: publisher: ( )
|
[#]: publisher: ( )
|
||||||
[#]: url: ( )
|
[#]: url: ( )
|
||||||
|
@ -0,0 +1,117 @@
|
|||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (geekpi)
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
[#]: subject: (FinalCrypt – An Open Source File Encryption Application)
|
||||||
|
[#]: via: (https://itsfoss.com/finalcrypt/)
|
||||||
|
[#]: author: (Ankush Das https://itsfoss.com/author/ankush/)
|
||||||
|
|
||||||
|
FinalCrypt - 一个开源文件加密应用
|
||||||
|
======
|
||||||
|
|
||||||
|
我通常不会加密文件 - 但如果我打算整理我的重要文件或凭证,加密程序就会派上用场。
|
||||||
|
|
||||||
|
你可能已经在使用像 [GnuPG][1] 这样的程序来帮助你加密/解密 Linux 上的文件。还有 [EncryptPad][2] 也可以加密你的笔记。
|
||||||
|
|
||||||
|
但是,我看到了一个名为 FinalCrypt 的新的免费开源加密工具。你可以在 [GitHub 页面][3]上查看最新的版本和源码。
|
||||||
|
|
||||||
|
在本文中,我将分享使用此工具的经验。请注意,我不会将它与其他程序进行比较 - 因此,如果你想要多个程序之间的详细比较,请在评论中告诉我们。
|
||||||
|
|
||||||
|
![FinalCrypt][4]
|
||||||
|
|
||||||
|
### 使用 FinalCrypt 加密文件
|
||||||
|
|
||||||
|
FinalCrypt 使用[一次性密码本][5]密钥生成密码来加密文件。换句话说,它会生成一个 OTP 密钥,你将使用该密钥加密或解密你的文件。
|
||||||
|
|
||||||
|
根据你指定的密钥大小,密钥是完全随机的。因此,没有密钥文件就无法解密文件。
|
||||||
|
|
||||||
|
虽然 OTP 密钥用于加密/解密简单而有效,但管理或保护密钥文件对某些人来说可能是不方便的。
|
||||||
|
|
||||||
|
如果要使用 FinalCrypt,可以从它的网站下载 DEB/RPM 文件。FinalCrypt 也可用于 Windows 和 macOS。
|
||||||
|
|
||||||
|
下载后,只需双击 [deb][6] 或 rpm 文件就能安装。如果需要,你还可以从源码编译。
|
||||||
|
|
||||||
|
### 使用 FileCrypt
|
||||||
|
|
||||||
|
该视频演示了如何使用FinalCrypt:
|
||||||
|
|
||||||
|
<https://youtu.be/6Ir8VcZ26E4>
|
||||||
|
|
||||||
|
如果你喜欢 Linux 相关的视频,请[订阅我们的 YouTube 频道][7]。
|
||||||
|
|
||||||
|
安装 FinalCrypt 后,你将在已安装的应用列表中找到它。从这里启动它。
|
||||||
|
|
||||||
|
启动后,你将看到(分割的)两栏,一个进行加密/解密,另一个选择 OTP 文件。
|
||||||
|
|
||||||
|
![Using FinalCrypt for encrypting files in Linux][8]
|
||||||
|
|
||||||
|
首先,你必须生成 OTP 密钥。下面是做法:
|
||||||
|
|
||||||
|
![finalcrypt otp][9]
|
||||||
|
|
||||||
|
请注意你的文件名可以是任何内容 - 但你需要确保密钥文件大小大于或等于要加密的文件。我觉得这很荒谬,但事实就是如此。
|
||||||
|
|
||||||
|
![][10]
|
||||||
|
|
||||||
|
生成文件后,选择窗口右侧的密钥,然后选择要在窗口左侧加密的文件。
|
||||||
|
|
||||||
|
生成 OTP 后,你会看到高亮显示的校验和值,密钥文件大小和有效状态:
|
||||||
|
|
||||||
|
![][11]
|
||||||
|
|
||||||
|
选择之后,你只需要点击“**加密**”来加密这些文件,如果已经加密,那么点击“**解密**”来解密这些文件。
|
||||||
|
|
||||||
|
![][12]
|
||||||
|
|
||||||
|
你还可以在命令行中使用 FinalCrypt 来自动执行加密作业。
|
||||||
|
|
||||||
|
#### 如何保护你的 OTP 密钥?
|
||||||
|
|
||||||
|
加密/解密你想要保护的文件很容易。但是,你应该在哪里保存你的 OTP 密钥?
|
||||||
|
|
||||||
|
如果你未能将 OTP 密钥保存在安全的地方,那么它几乎没用。
|
||||||
|
|
||||||
|
嗯,最好的方法之一是使用专门的 USB 盘保存你的密钥。只需要在解密文件时将它插入即可。
|
||||||
|
|
||||||
|
除此之外,如果你认为足够安全,你可以将密钥保存在[云服务][13]中。
|
||||||
|
|
||||||
|
有关 FinalCrypt 的更多信息,请访问它的网站。
|
||||||
|
|
||||||
|
[FinalCrypt](https://sites.google.com/site/ronuitholland/home/finalcrypt)
|
||||||
|
|
||||||
|
**总结**
|
||||||
|
|
||||||
|
它开始时看上去有点复杂,但它实际上是 Linux 中一个简单且用户友好的加密程序。如果你想看看其他的,还有一些其他的[加密保护文件夹][14]的程序。
|
||||||
|
|
||||||
|
你如何看待 FinalCrypt?你还知道其他类似可能更好的程序么?请在评论区告诉我们,我们将会查看的!
|
||||||
|
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://itsfoss.com/finalcrypt/
|
||||||
|
|
||||||
|
作者:[Ankush Das][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||||
|
|
||||||
|
[a]: https://itsfoss.com/author/ankush/
|
||||||
|
[b]: https://github.com/lujun9972
|
||||||
|
[1]: https://www.gnupg.org/
|
||||||
|
[2]: https://itsfoss.com/encryptpad-encrypted-text-editor-linux/
|
||||||
|
[3]: https://github.com/ron-from-nl/FinalCrypt
|
||||||
|
[4]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt.png?resize=800%2C450&ssl=1
|
||||||
|
[5]: https://en.wikipedia.org/wiki/One-time_pad
|
||||||
|
[6]: https://itsfoss.com/install-deb-files-ubuntu/
|
||||||
|
[7]: https://www.youtube.com/c/itsfoss?sub_confirmation=1
|
||||||
|
[8]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt.jpg?fit=800%2C439&ssl=1
|
||||||
|
[9]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt-otp-key.jpg?resize=800%2C443&ssl=1
|
||||||
|
[10]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt-otp-generate.jpg?ssl=1
|
||||||
|
[11]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt-key.jpg?fit=800%2C420&ssl=1
|
||||||
|
[12]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt-encrypt.jpg?ssl=1
|
||||||
|
[13]: https://itsfoss.com/cloud-services-linux/
|
||||||
|
[14]: https://itsfoss.com/password-protect-folder-linux/
|
||||||
|
[15]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2019/02/finalcrypt.png?fit=800%2C450&ssl=1
|
@ -1,74 +1,74 @@
|
|||||||
[#]: collector: (lujun9972)
|
[#]: collector: "lujun9972"
|
||||||
[#]: translator: ( )
|
[#]: translator: "zero-mk"
|
||||||
[#]: reviewer: ( )
|
[#]: reviewer: " "
|
||||||
[#]: publisher: ( )
|
[#]: publisher: " "
|
||||||
[#]: url: ( )
|
[#]: url: " "
|
||||||
[#]: subject: (Bash-Insulter : A Script That Insults An User When Typing A Wrong Command)
|
[#]: subject: "Bash-Insulter : A Script That Insults An User When Typing A Wrong Command"
|
||||||
[#]: via: (https://www.2daygeek.com/bash-insulter-insults-the-user-when-typing-wrong-command/)
|
[#]: via: "https://www.2daygeek.com/bash-insulter-insults-the-user-when-typing-wrong-command/"
|
||||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
[#]: author: "Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/"
|
||||||
|
|
||||||
Bash-Insulter : A Script That Insults An User When Typing A Wrong Command
|
Bash-Insulter : 一个在输入错误命令时侮辱用户的脚本
|
||||||
======
|
======
|
||||||
|
|
||||||
This is such a nice and funny script that insult an user whenever they are typing a wrong command in terminal.
|
这是一个非常有趣的脚本,每当用户在终端输入错误的命令时,它都会侮辱用户。
|
||||||
|
|
||||||
It’s make you to feel happy when you are working on some issues.
|
它让你在处理一些问题时感到快乐。
|
||||||
|
|
||||||
But somebody feel bad when the get an insult. However, i really feel happy when i get an insulted on terminal.
|
有的人在受到终端侮辱的时候感到不愉快。但是,当我受到终端的侮辱时,我真的很开心。
|
||||||
|
|
||||||
It’s a funny CLI tool that insults you with random phrases if you do mistake.
|
这是一个有趣的CLI(译者注:command-line interface) 工具,在你弄错的时候,会用随机短语侮辱你。
|
||||||
|
|
||||||
Also, it allows you to update your own phrases.
|
此外,它允许您添加自己的短语。
|
||||||
|
|
||||||
### How To Install Bash-Insulter In Linux?
|
### 如何在 Linux 上安装 Bash-Insulter?
|
||||||
|
|
||||||
Make sure, git package were installed on your system before performing Bash-Insulter installation. If no, use the following command to install it.
|
在安装 Bash-Insulter 之前,请确保您的系统上安装了 git。如果没有,请使用以下命令安装它。
|
||||||
|
|
||||||
For **`Fedora`** system, use **[DNF Command][1]** to install git.
|
对于 **`Fedora`** 系统, 请使用 **[DNF 命令][1]** 安装 git
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo dnf install git
|
$ sudo dnf install git
|
||||||
```
|
```
|
||||||
|
|
||||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][2]** or **[APT Command][3]** to install git.
|
对于 **`Debian/Ubuntu`** 系统,,请使用 **[APT-GET 命令][2]** 或者 **[APT 命令][3]** 安装 git。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo apt install git
|
$ sudo apt install git
|
||||||
```
|
```
|
||||||
|
|
||||||
For **`Arch Linux`** based systems, use **[Pacman Command][4]** to install git.
|
对于基于 **`Arch Linux`** 的系统, 请使用 **[Pacman 命令][4]** 安装 git。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo pacman -S git
|
$ sudo pacman -S git
|
||||||
```
|
```
|
||||||
|
|
||||||
For **`RHEL/CentOS`** systems, use **[YUM Command][5]** to install git.
|
对于 **`RHEL/CentOS`** systems, 请使用 **[YUM 命令][5]** 安装 git。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo yum install git
|
$ sudo yum install git
|
||||||
```
|
```
|
||||||
|
|
||||||
For **`openSUSE Leap`** system, use **[Zypper Command][6]** to install git.
|
对于 **`openSUSE Leap`** system, 请使用 **[Zypper 命令][6]** 安装 git。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo zypper install git
|
$ sudo zypper install git
|
||||||
```
|
```
|
||||||
|
|
||||||
We can easily install it by cloning the developer github repository.
|
我们可以通过克隆(clone)开发人员的github存储库轻松地安装它。
|
||||||
|
|
||||||
First clone the Bash-insulter repository.
|
首先克隆 Bash-insulter 存储库。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ git clone https://github.com/hkbakke/bash-insulter.git bash-insulter
|
$ git clone https://github.com/hkbakke/bash-insulter.git bash-insulter
|
||||||
```
|
```
|
||||||
|
|
||||||
Move the downloaded file under `/etc` folder.
|
将下载的文件移动到文件夹 `/etc` 下。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo cp bash-insulter/src/bash.command-not-found /etc/
|
$ sudo cp bash-insulter/src/bash.command-not-found /etc/
|
||||||
```
|
```
|
||||||
|
|
||||||
Append the following lines into `/etc/bash.bashrc` file.
|
将下面的代码添加到 `/etc/bash.bashrc` 文件中。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ vi /etc/bash.bashrc
|
$ vi /etc/bash.bashrc
|
||||||
@ -79,13 +79,13 @@ if [ -f /etc/bash.command-not-found ]; then
|
|||||||
fi
|
fi
|
||||||
```
|
```
|
||||||
|
|
||||||
Run the following command to take the changes to effect.
|
运行以下命令使更改生效。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo source /etc/bash.bashrc
|
$ sudo source /etc/bash.bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
Do you want to test this? if so, type some wrong command in terminal and see how it insult you.
|
你想测试一下安装是否生效吗?你可以试试在终端上输入一些错误的命令,看看它如何侮辱你。
|
||||||
|
|
||||||
```
|
```
|
||||||
$ unam -a
|
$ unam -a
|
||||||
@ -95,9 +95,9 @@ $ pin 2daygeek.com
|
|||||||
|
|
||||||
![][8]
|
![][8]
|
||||||
|
|
||||||
If you would like to append your own phrases then navigate to the following file and update it.
|
如果您想附加您自己的短语,则导航到以下文件并更新它
|
||||||
|
|
||||||
You can add your phrases within `messages` section.
|
您可以在 `messages` 部分中添加短语。
|
||||||
|
|
||||||
```
|
```
|
||||||
# vi /etc/bash.command-not-found
|
# vi /etc/bash.command-not-found
|
||||||
@ -177,7 +177,7 @@ via: https://www.2daygeek.com/bash-insulter-insults-the-user-when-typing-wrong-c
|
|||||||
|
|
||||||
作者:[Magesh Maruthamuthu][a]
|
作者:[Magesh Maruthamuthu][a]
|
||||||
选题:[lujun9972][b]
|
选题:[lujun9972][b]
|
||||||
译者:[译者ID](https://github.com/译者ID)
|
译者:[zero-mk](https://github.com/zero-mk)
|
||||||
校对:[校对者ID](https://github.com/校对者ID)
|
校对:[校对者ID](https://github.com/校对者ID)
|
||||||
|
|
||||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user