commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Watches for file modifications in the current directory and tails the file.
This one has a better performance, as it is a one pass count with awk. For this script it might not matter, but for others it is a good optiomization.
find ip address in all files in /etc directory. can be used to find any string in any directory really
Some computers these days don't have an HDD activity light, but they still have a useless caps-lock, so why not re-purpose that light to show HDD activity?
Requires setleds and dstat and probably needs to run as root.
make usable on OSX with filenames containing spaces. note: will still break if filenames contain newlines... possible, but who does that?!
The number on the far right is ratio of comments to code, expressed as a percentage. For the rest of the Yardstick documentation see https://github.com/calmh/yardstick/blob/master/README.md#reported-metrics
xargs is a more elegant approach to executing a command on find results then -exec as -exec is meant as a filtering flag.
Returns the version of the kernel module specified as "MODULENAME", when available.
`pwd` returns the current path
`grep -o` prints each slash on new line
perl generates the paths sequence: './.', './../.', ...
`readlink` canonicalizes paths (it makes the things more transparent)
`xargs -tn1` applies chmod for each of them. Each command applied is getting printed to STDERR.
This version also attaches to new processes forked by the parent apache process. That way you can trace all current and *future* apache processes.
completely remove those packages that leave files in debian / ubuntu marked with rc and not removed completely with traditional tools