How to kill all processes with a given partial name? [closed]
Use pkill -f, which matches the pattern for any part of the command line pkill -f my_pattern Just in case it doesn’t work, try to use this one as well: pkill -9 -f my_pattern
Use pkill -f, which matches the pattern for any part of the command line pkill -f my_pattern Just in case it doesn’t work, try to use this one as well: pkill -9 -f my_pattern
Preserving perfect order while performing separate redirections is not even theoretically possible without some ugly hackery. Ordering is only preserved in writes (in O_APPEND mode) directly to the same file; as soon as you put something like tee in one process but not the other, ordering guarantees go out the window and can’t be retrieved … Read more
In the bash manual, note that brace expansion during parameter substitution, but not recursively: The order of expansions is: brace expansion; tilde expansion, parameter and variable expansion, arithmetic expansion, and command substitution (done in a left-to-right fashion); word splitting; and filename expansion. This implies that any tilde (or parameter references or command substitution) stored unexpanded … Read more
When you execute the docker runcommand, be sure to add –net myapp. Here is a full step-by-step tutorial (online version): How to deploy swarm on a cluster with multi-hosts network TL;DR: step-by-step tutorial to deploy a multi-hosts network using Swarm. I wanted to put online this tutorial ASAP so I didn’t even take time for … Read more
The ls command has a parameter -t to sort by time. You can then grab the first (newest) with head -1. ls -t b2* | head -1 But beware: Why you shouldn’t parse the output of ls My personal opinion: parsing ls is only dangerous when the filenames can contain funny characters like spaces or … Read more
You can also have each tab run a set command. gnome-terminal –tab -e “tail -f somefile” –tab -e “some_other_command”
The other answers are correct, in that chmod -R 755 will set these permissions to all files and subfolders in the tree. But why on earth would you want to? It might make sense for the directories, but why set the execute bit on all the files? I suspect what you really want to do … Read more
If -prune doesn’t work for you, this will: find -name “*.js” -not -path “./directory/*” Caveat: requires traversing all of the unwanted directories.
The first line, #!/bin/bash, tells Linux where to find the interpreter. The script should also be executable with chmod +x script.sh, which it appears you did. It is highly likely that you created this file with a windows editor, which will place a <cr><lf> at the end of each line. This is the standard under … Read more