Monitors basic wireless interface statistics, such as signal strength and discarded packets. The watch command's -n parameter sets a refresh rate of every 1 second. Show Sample Output
... building upon Zhoul's EXCELLENT example... my 'expect' output had additional garbage. This script also: * converts the ESC-H sequence (reposition cursor) to new-line characters * removes BACKSPACES and BELLS * removes trailing spaces * removes NON-ASCII characters * and consolidates redundant lines (my input had multiple blank lines (100s))
aha (https://github.com/theZiz/aha) is a program to convert ANSI escape sequence of a unix terminal to HTML code. wkhtmltoimage is a program to convert html file to image file. This one-liner will convert text file to image file, and set the image file as wallpaper by feh without temporary file.
to kill, use `kill PID` Credit: user Craig Ringer on stackexchange.com, recommends to kill the process rather than deleting postmaster.pid when there is an orphan Postgresql server process. Show Sample Output
just some jq code... Show Sample Output
Cleaner than the top alternative Show Sample Output
The given file may contain any kind of characters. This is compatible for most simple mathematical operation. For the first number found, it will be replaced by the result of a factor operation of 1000. To change the filename or multiplactor or number regular expression, change the first fixed values. Show Sample Output
Extrae los registros MX Show Sample Output
It takes the first value of /prov/loadavg to print that many stars followed by the value. Show Sample Output
simple jq one-liner to convert from configmaps to secrets (which require the values to be base64 encoded). To automatically pull the config map, convert it, and re-upload the corresponding secret: kubectl get --export -o json cm [configmap name] | jq 'with_entries(if .key == "data" then .value=(.value | to_entries | map( { (.key): (.value|@base64) } ) | add ) elif .key == "kind" then .value="Secret" else . end)' > secret.json; kubectl create -f secret.json Show Sample Output
Trying to check for an open port and missing netcat or nmap? This is the lowest common denominator way to verify a port is accessible from one server to another. This will give you a pretty quick return of 0 if it works. If it fails, it will just hang and takes awhile to timeout. I usually ctrl+c the command. "echo ?$" will give you an exit code other then 0 after you exit. Show Sample Output
Get the total RESIDENT memory used by processes of a specific name. This means this is the MINIMUM used by a process, but some memory could be paged out to swap. Show Sample Output
(echo "https://example.com/"; echo "https://example.com/"; echo "https://example.com/"; echo "https://example.com/") | parallel -k 'ab -n 10000 -c 15 {}'
You need to use the aws ec2 describe instances to get the JSON file. Show Sample Output
install json-to-js as a npm global package
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: