add kill all process of a program

This commit is contained in:
onceupon 2018-05-28 10:15:48 +08:00 committed by GitHub
parent ee27648b74
commit ad2e29fcdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
# Bash-Oneliner
Hi bash learners and bioinformaticans, welcome to Bash Oneliner. I started studying bioinformatics data four years ago (recently started working on cloud computing), and was amazed by those single-word bash commands which are much faster than my dull scripts, so much time can be saved through knowing command-line shortcuts and scripting. Not all the code here is oneliner (if the ';' counts..), but i put effort on making them brief and fast. I am mainly using Ubuntu, RedHat and Linux Mint, sorry if the commands dont work on your system.
I am glad that you are here! I started working on bioinformatics four years ago (recently switched to cloud computing), and was amazed by those single-word bash commands which are much faster than my dull scripts, so much time can be saved through knowing command-line shortcuts and scripting. Not all the code here is oneliner (if the ';' counts..), but i put effort on making them brief and fast. I am mainly using Ubuntu, RedHat and Linux Mint, sorry if the commands dont work on your system.
This blog will focus on simple bash commands for parsing data, most of which are for tsv files (tab-separated values); some of them are for Linux system maintenance. I apologize that there are no detailed citation for all the commands, but they are probably from dear Google and Stackoverflow.
This blog will focus on simple bash commands for parsing data; some of them are for Linux system maintenance. I apologize that there are no detailed citation for all the commands, but they are probably from dear Google and Stackoverflow.
English and bash are not my first language, so... correct me anytime, thank you!
And if you know any cool command that are not included here, Please Teach Me.
@ -1550,6 +1550,12 @@ wall -n hihi
```bash
pkill -U user_name
```
##### Kill all process of a program
```bash
kill -9 $(ps aux | grep 'program_name' | awk '{print $2}')
```
##### Set gedit preference on server
-->you might have to install the following: