Tested on FreeBSD 8.1 and CSH. The scripts works correctly but the Zombies do not die! I hope it will run and function as expected in Linux and others. Show Sample Output
It's only to logout all other user's except "root"
Only to logout all users except root
eg:
Already running cmd
sleep 120
Substitution cmd
c=$(pgrep sleep) && sleep 5 && kill $c
Occasionally, to force zone updating, cache flush is necessary. This command is better than restart the mydns daemon.
The previously-posted one-liner didn't work for me for whatever reason, so I ended up doing this instead.
This one liner is to kill all google chrome tabs. This works similar to $ killall firefox command which is to kill all firefox processes.
run this in another terminal, were xxxx is the process ID of the running dd process. the progress will report on the original terminal that you ran dd on
Some IO intensive process make the system unresponsive. This function periodically starts/stops a process, which hopefully releases some resources for other activities. This function is useful when ionice is not available Show Sample Output
Also ignoring "sshd" server is necessary since you should not kill ssh server processes.
Useful command to get information about running java process and treads, to see log look into the default log for your java application
just a leaner, smaller version. Love the original idea!
Kills all process that belongs to the user that runs it - excluding bash, sshd (so putty/ssh session will be spared). The bit that says grep -vE "..." can be extended to include ps line patterns that you want to spare. If no process can be found on the hitlist, it will print # NOTHING TO KILL. Otherwise, it will print # KILL EM ALL, with the cull list.
Outputs the PID of any given file run from a command line... Hope it helps!
If you know that you want only the first match from a 'find' command, this will terminate the find as soon as a match is found. Recent versions of GNU find have the -quit parameter, which does the same thing as this, so this is only useful if you are stuck with an older version of find. or need to write a backward portable script. I can't take credit for this - I saw it on a chat room where I work and thought it was useful, so am sharing it here both for others, and in case I want to remember it in the future. Show Sample Output
The other 2 commands that are listed will also kill the egrep process and any libexec processes because the .exe isn't escaped so it is really using . meaning anything containing exe. The command i posted escapes the (dot) in .exe and then filters the actual egrep process so that it doesn't get killed before the other processes being killed. Also added the -9 switch for kill to send sigterm to the processes, in case people are wondering why processes aren't getting killed after running just kill . This should work better for people :)
Kill all process that concide whit PATTERN Show Sample Output
Kills all the threads from the user provided in the WHERE request. Can be refined through the SQL request, of course, see http://dev.mysql.com/doc/refman/5.1/en/processlist-table.html for the available columns.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: