How to get a reminder after a lengthy operation to complete?

As a Linux engineer, a lot of work is done at the command line. Sometimes we execute a command, it may take a long time to complete, for example sudo apt-get update, or compile a system needs to spend half an hour, what if we do not do your job waiting for the results, that efficiency would be too low.

How do we know that the first time the task has already been implemented? This article will introduce a tool: NotiFyreit can be after the task is completed, pop to remind you. So that when the time is not long task, you can concentrate on other work, do not dry waiting, or from time to time to see the results.

NotiFyre installation

In Ubuntu, execute the following command to complete the installation.

$ sudo apt-get install notify-osd pulseaudio-utils libnotify-bin

After installation, you can execute the following command to see if there is pop:

$ notify-send "hello"

If you see a window that says hello bomb appears then that this tool works fine. If you do not see, you're still lacking some of the necessary components, you need to install it.

$ sudo apt-get --reinstall install libnotify-bin notify-osd

After the component is installed, re-notify-send execution to see if there is pop, under normal circumstances there will pop up.

Then, you need to download NotiFyre script. It is an open source project, the project at the following address:

https://github.com/kaustubhhiware/NotiFyre

In fact, we only need it to two scripts:

$ curl https://raw.githubusercontent.com/kaustubhhiware/NotiFyre/master/notifyre.sh -o ~/notifyre.sh
$ curl https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh -o ~/bash-preexec.sh

We need to edit the bashrc file, and then at the end of the download above good script added to the list, the more the better end.

$ sudo vi ~/.bashrc
# 将以下两句添加到末尾
source ~/notifyre.sh
source ~/bash-preexec.sh

Execution wq to save and exit, and then use the source command to make the changes to take effect.

$ source ~/.bashrc

Now, when you execute a command completion, it will automatically pop up a window to prompt you to complete the task, is not it cool?

After reading all the love, the point of a walk praise chant? Your greatest force "triple" continued Xu Liang is created!

  1. Watch the original public number " Liang Xu Linux ", the first time for the latest Linux dry!
  2. No background information public reply [interview] [] [Resume] to obtain first-tier manufacturers featured interview, self-improvement, resumes and other information.
  3. Watch my blog: lxlinux.net

Guess you like

Origin www.cnblogs.com/yychuyu/p/12642381.html