Summary: To find the PID of a running UNIX/XWindow process: $ xprop _NET_WM_PID If that fails: $ ps -ww -fp <PID> $ pwdx <PID> Detailed explanation: So How can you find the PID (not Window ID!) of a running UNIX/XWindow process? Method 1 (simple): $ xprop _NET_WM_PID … and then click on window of interest […]
shell
Using curl and POST requests to automate data retrieval from a website
Problem: A site contains data which is of interest to us. The data is uniformly structured and available for examination by the general public (i.e. no login required) but is not automatically accessible, i.e. viewing it requires repetitive user interaction (such as setting a date range, clicking a ‘submit’ button, etc). In addition, usually the […]
How to kill a stuck linux mount
How can you remove a mounted USB stick or USB HDD from the list of mounted devices? PROBLEM We have all done it – in a hurry you unplug a USB drive which was mounted in your Linux system without properly unmounting it and then it sits there in your list of mounts and you […]
RPM/yum : List (installed) packages versions (and grep ‘OR’)
Here’s how to list all packages whose names start with ‘nss’ yum info -v nss* | grep -v Committer | grep -w ‘Name\|Version\|Release\|Description\|Repo’ Here’s how to list all INSTALLED packages whose names start with ‘nss’ yum info -v nss* | grep -A12 -B5 -w ‘installed’ | grep -v Committer | grep -w ‘Name\|Version\|Release\|Description\|Repo\|installed’ And since […]
How to make ‘man’ or ‘less’ paged text not disappear from screen after exit?
Problem: Depending on your Linux distribution, the text displayed by the ‘man’ command (or any other text piped into ‘less’ for that matter) may stay on your screen upon exit from man/less or be cleared from your screen upon exit. Many people find it useful to have the man page text stay on the screen, […]