You can use strace on a specific pid to figure out what a specific process is doing, e.g.:
strace -fp <pid>
You might see something like:
select(9, [3 5 8], [], [], {0, 999999}) = 0 (Timeout)
rofi.kb-row-up: Up,Control+k,Shift+Tab,Shift+ISO_Left_Tab | |
rofi.kb-row-down: Down,Control+j | |
rofi.kb-accept-entry: Control+m,Return,KP_Enter | |
rofi.terminal: mate-terminal | |
rofi.kb-remove-to-eol: Control+Shift+e | |
rofi.kb-mode-next: Shift+Right,Control+Tab,Control+l | |
rofi.kb-mode-previous: Shift+Left,Control+Shift+Tab,Control+h | |
rofi.kb-remove-char-back: BackSpace |
# Input: list of rows with format: "<filesize> filename", e.g. | |
# filesizes.txt | |
####################### | |
# 1000K file1.txt | |
# 200M file2.txt | |
# 2G file3.txt | |
# | |
# Output: | |
cat filesizes.txt | numfmt --from=iec | awk 'BEGIN {sum=0} {sum=sum+$1} END {printf "%.0f\n", sum}' |
#!/bin/bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
# do it once | |
seq 1 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# do it twice | |
seq 2 | parallel -n0 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# do it 4 times, but at 2 a time | |
seq 4 | parallel -n0 -j2 "curl -H 'Content-Type: application/json' http://httpbin.org/post -X POST -d '{\"url\":\"http://google.com/\"}'" | |
# you can also put all your commands into a file |
# Add the following line to your byobu keybindings.tmux file (~/.byobu/keybindings.tmux). | |
# This will set the key combo ctrl-a, b (control plus 'a', then 'b') to copy the current byobu/tmux paste buffer to the X/Gnome clipboard. | |
# This example uses parcellite to manage the X/Gnome clipboard so that, obviously, must be installed too. | |
# parcellite might be able to be replaced with another tool like xsel but that hasn't been tested yet. | |
bind b run-shell "tmux show-buffer | parcellite > /dev/null >&1" |
#!/bin/bash | |
# Author: Erik Kristensen | |
# Email: [email protected] | |
# License: MIT | |
# Nagios Usage: check_nrpe!check_docker_container!_container_id_ | |
# Usage: ./check_docker_container.sh _container_id_ | |
# | |
# Depending on your docker configuration, root might be required. If your nrpe user has rights | |
# to talk to the docker daemon, then root is not required. This is why root privileges are not |
key_move_song_up = 'K' | |
key_move_song_down = 'J' | |
key_next_found_position = 'n' | |
key_prev_found_position = 'N' | |
key_prev_column = 260 'h' | |
key_next_column = 261 'l' | |
key_lyrics = '.' | |
key_home = 262 'g' | |
key_end = 360 'G' |