Check These Out
Or even easier, if it's available:
$ killall firefox
I have no idea why you would want to rely on two unusual dependencies to do something that can be done a hundred ways from coreutils...
Several times, I find myself hitting my up arrow, and changing the search term. Unfortunately, I find myself wasting too much time typing:
$ grep kernel /var/log/messages
Redirecting STDIN allows me to put the search term at the end so I less cursor movement to change what I'm searching for:
$ < /var/log/messages grep kernel
If you're using the emacs keyboard binding, then after you press your up arrow, press CTRL+w to erase the word.
If this has already been submitted, I couldn't find it with the search utility.
In OSX you would have to make sure that you "sudo -s" your way to happiness since it will give a few "Permission denied" errors before finally spitting out the results. In OSX the directory structure has to start with the "Users" Directory then it will recursively perform the operation.
Your Lord and master,
Mematron
su www-apache/ftp user and then
check readable: find ~/ -type d \( -wholename '/dev/*' -o -wholename '/sys/*' -o -wholename '/proc/*' \) -prune -o -exec test -r {} \; -exec echo {} readable \; 2>/dev/null
check writable: find ~/ -type d \( -wholename '/dev/*' -o -wholename '/sys/*' -o -wholename '/proc/*' \) -prune -o -exec test -w {} \; -exec echo {} writable \; 2>/dev/null
From the man page.
lft ? display the route packets take to a network host/socket using one of several layer-4
protocols and methods; optionally show heuristic network information in transitu
-A Enable lookup and display of of AS (autonomous system) numbers (e.g., [1]). This option
queries one of several whois servers (see options 'C' and 'r') in order to ascertain the origin
ASN of the IP address in question. By default, LFT uses the pWhoIs service whose ASN data
tends to be more accurate and more timely than using the RADB as it is derived from the
Internet's global routing table.
-N Enable lookup and display of network or AS names (e.g., [GNTY-NETBLK-4]). This option
queries Prefix WhoIs, RIPE NCC, or the RADB (as requested). In the case of Prefix WhoIs or
RADB, the network name is displayed. In the case of RIPE NCC, the AS name is displayed.
Set Remote Server Date using Local Server Time (push)
Converts any number of seconds into days, hours, minutes and seconds.
sec2dhms() {
declare -i SS="$1"
D=$(( SS / 86400 ))
H=$(( SS % 86400 / 3600 ))
M=$(( SS % 3600 / 60 ))
S=$(( SS % 60 ))
[ "$D" -gt 0 ] && echo -n "${D}:"
[ "$H" -gt 0 ] && printf "%02g:" "$H"
printf "%02g:%02g\n" "$M" "$S"
}
miss a class at UTOSC2010? need a refresher? use this to curl down all the presentations from the UTOSC website. (http://2010.utosc.com) NOTE/WARNING this will dump them in the current directory and there are around 37 and some are big - tested on OSX10.6.1