<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Dave's Ramblings</title>
	<atom:link href="http://blog.captivereefing.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.captivereefing.com</link>
	<description>Random thoughts and rambling ons.            Now moving towards high tech low drag content.</description>
	<pubDate>Fri, 27 Jun 2008 19:26:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
	<language>en</language>
			<item>
		<title>Common Linux CLI Operations</title>
		<link>http://blog.captivereefing.com/2008/06/27/common-linux-cli-operations/</link>
		<comments>http://blog.captivereefing.com/2008/06/27/common-linux-cli-operations/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 19:26:45 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Linux / Unix]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/06/27/common-linux-cli-operations/</guid>
		<description><![CDATA[This is a linux command line reference for common operations.
Command	Description
•	apropos whatis	Show commands pertinent to string. See also threadsafe
•	man -t man &#124; ps2pdf - > man.pdf	make a pdf of a manual page
 	which command	Show full path name of command
 	time command	See how long a command takes
•	time cat	Start stopwatch. Ctrl-d to stop. See also sw
•	nice info	Run a [...]]]></description>
			<content:encoded><![CDATA[<p>This is a linux command line reference for common operations.</p>
<p>Command	Description<br />
•	apropos whatis	Show commands pertinent to string. See also threadsafe<br />
•	man -t man | ps2pdf - > man.pdf	make a pdf of a manual page<br />
 	which command	Show full path name of command<br />
 	time command	See how long a command takes<br />
•	time cat	Start stopwatch. Ctrl-d to stop. See also sw<br />
•	nice info	Run a low priority command (The &#8220;info&#8221; reader in this case)<br />
•	renice 19 -p $$	Make shell (script) low priority. Use for non interactive tasks<br />
dir navigation<br />
•	cd -	Go to previous directory<br />
•	cd	Go to $HOME directory<br />
 	(cd dir &#038;&#038; command)	Go to dir, execute command and return to current dir<br />
•	pushd .	Put current dir on stack so you can popd back to it<br />
file searching<br />
•	alias l=&#8217;ls -l &#8211;color=auto&#8217;	quick dir listing<br />
•	ls -lrt	List files by date. See also newest and find_mm_yyyy<br />
•	ls /usr/bin | pr -T9 -W$COLUMNS	Print in 9 columns to width of terminal<br />
 	find -name &#8216;*.[ch]&#8216; | xargs grep -E &#8216;expr&#8217;	Search &#8216;expr&#8217; in this dir and below. See also findrepo<br />
 	find -type f -print0 | xargs -r0 grep -F &#8216;example&#8217;	Search all regular files for &#8216;example&#8217; in this dir and below<br />
 	find -maxdepth 1 -type f | xargs grep -F &#8216;example&#8217;	Search all regular files for &#8216;example&#8217; in this dir<br />
 	find -maxdepth 1 -type d | while read dir; do echo $dir; echo cmd2; done	Process each item with multiple commands (in while loop)<br />
•	find -type f ! -perm -444	Find files not readable by all (useful for web site)<br />
•	find -type d ! -perm -111	Find dirs not accessible by all (useful for web site)<br />
•	locate -r &#8216;file[^/]*\.txt&#8217;	Search cached index for names. This re is like glob *file*.txt<br />
•	look reference	Quickly search (sorted) dictionary for prefix<br />
•	grep &#8211;color reference /usr/share/dict/words	Highlight occurances of regular expression in dictionary<br />
archives and compression<br />
 	gpg -c file	Encrypt file<br />
 	gpg file.gpg	Decrypt file<br />
 	tar -c dir/ | bzip2 > dir.tar.bz2	Make compressed archive of dir/<br />
 	bzip2 -dc dir.tar.bz2 | tar -x	Extract archive (use gzip instead of bzip2 for tar.gz files)<br />
 	tar -c dir/ | gzip | gpg -c | ssh user@remote &#8216;dd of=dir.tar.gz.gpg&#8217;	Make encrypted archive of dir/ on remote machine<br />
 	find dir/ -name &#8216;*.txt&#8217; | tar -c &#8211;files-from=- | bzip2 > dir_txt.tar.bz2	Make archive of subset of dir/ and below<br />
 	find dir/ -name &#8216;*.txt&#8217; | xargs cp -a &#8211;target-directory=dir_txt/ &#8211;parents	Make copy of subset of dir/ and below<br />
 	( tar -c /dir/to/copy ) | ( cd /where/to/ &#038;&#038; tar -x -p )	Copy (with permissions) copy/ dir to /where/to/ dir<br />
 	( cd /dir/to/copy &#038;&#038; tar -c . ) | ( cd /where/to/ &#038;&#038; tar -x -p )	Copy (with permissions) contents of copy/ dir to /where/to/<br />
 	( tar -c /dir/to/copy ) | ssh -C user@remote &#8216;cd /where/to/ &#038;&#038; tar -x -p&#8217; 	Copy (with permissions) copy/ dir to remote:/where/to/ dir<br />
 	dd bs=1M if=/dev/sda | gzip | ssh user@remote &#8216;dd of=sda.gz&#8217;	Backup harddisk to remote machine<br />
rsync (Network efficient file copier: Use the &#8211;dry-run option for testing)<br />
 	rsync -P rsync://rsync.server.com/path/to/file file	Only get diffs. Do multiple times for troublesome downloads<br />
 	rsync &#8211;bwlimit=1000 fromfile tofile	Locally copy with rate limit. It&#8217;s like nice for I/O<br />
 	rsync -az -e ssh &#8211;delete ~/public_html/ remote.com:&#8217;~/public_html&#8217;	Mirror web site (using compression and encryption)<br />
 	rsync -auz -e ssh remote:/dir/ . &#038;&#038; rsync -auz -e ssh . remote:/dir/	Synchronize current directory with remote one<br />
ssh (Secure SHell)<br />
 	ssh $USER@$HOST command	Run command on $HOST as $USER (default command=shell)<br />
•	ssh -f -Y $USER@$HOSTNAME xeyes	Run GUI command on $HOSTNAME as $USER<br />
 	scp -p -r $USER@$HOST: file dir/	Copy with permissions to $USER&#8217;s home directory on $HOST<br />
 	ssh -g -L 8080:localhost:80 root@$HOST	Forward connections to $HOSTNAME:8080 out to $HOST:80<br />
 	ssh -R 1434:imap:143 root@$HOST	Forward connections from $HOST:1434 in to imap:143<br />
wget (multi purpose download tool)<br />
•	(cd cli &#038;&#038; wget -nd -pHEKk http://www.pixelbeat.org/cmdline.html)	Store local browsable version of a page to the current dir<br />
 	wget -c http://www.example.com/large.file	Continue downloading a partially downloaded file<br />
 	wget -r -nd -np -l1 -A &#8216;*.jpg&#8217; http://www.example.com/dir/	Download a set of files to the current directory<br />
 	wget ftp://remote/file[1-9].iso/	FTP supports globbing directly<br />
•	wget -q -O- http://www.pixelbeat.org/timeline.html | grep &#8216;a href&#8217; | head	Process output directly<br />
 	echo &#8216;wget url&#8217; | at 01:00	Download url at 1AM to current dir<br />
 	wget &#8211;limit-rate=20k url	Do a low priority download (limit to 20KB/s in this case)<br />
 	wget -nv &#8211;spider &#8211;force-html -i bookmarks.html	Check links in a file<br />
 	wget &#8211;mirror http://www.example.com/	Efficiently update a local copy of a site (handy from cron)<br />
networking (Note ifconfig, route, mii-tool, nslookup commands are obsolete)<br />
 	ethtool eth0	Show status of ethernet interface eth0<br />
 	ethtool &#8211;change eth0 autoneg off speed 100 duplex full	Manually set ethernet interface speed<br />
 	iwconfig eth1	Show status of wireless interface eth1<br />
 	iwconfig eth1 rate 1Mb/s fixed	Manually set wireless interface speed<br />
•	iwlist scan	List wireless networks in range<br />
•	ip link show	List network interfaces<br />
 	ip link set dev eth0 name wan	Rename interface eth0 to wan<br />
 	ip link set dev eth0 up	Bring interface eth0 up (or down)<br />
•	ip addr show	List addresses for interfaces<br />
 	ip addr add 1.2.3.4/24 brd + dev eth0	Add (or del) ip and mask (255.255.255.0)<br />
•	ip route show	List routing table<br />
 	ip route add default via 1.2.3.254	Set default gateway to 1.2.3.254<br />
•	tc qdisc add dev lo root handle 1:0 netem delay 20msec	Add 20ms latency to loopback device (for testing)<br />
•	tc qdisc del dev lo root	Remove latency added above<br />
•	host pixelbeat.org	Lookup DNS ip address for name or vice versa<br />
•	hostname -i	Lookup local ip address (equivalent to host `hostname`)<br />
•	whois pixelbeat.org	Lookup whois info for hostname or ip address<br />
•	netstat -tupl	List internet services on a system<br />
•	netstat -tup	List active connections to/from system<br />
windows networking (Note samba is the package that provides all this windows specific networking support)<br />
•	smbtree	Find windows machines. See also findsmb<br />
 	nmblookup -A 1.2.3.4	Find the windows (netbios) name associated with ip address<br />
 	smbclient -L windows_box	List shares on windows machine or samba server<br />
 	mount -t smbfs -o fmask=666,guest //windows_box/share /mnt/share	Mount a windows share<br />
 	echo &#8216;message&#8217; | smbclient -M windows_box	Send popup to windows machine (off by default in XP sp2)<br />
text manipulation (Note sed uses stdin and stdout, so if you want to edit files, append
<oldfile>newfile)<br />
 	sed &#8217;s/string1/string2/g&#8217;	Replace string1 with string2<br />
 	sed &#8217;s/\(.*\)1/\12/g&#8217;	Modify anystring1 to anystring2<br />
 	sed &#8216;/ *#/d; /^ *$/d&#8217;	Remove comments and blank lines<br />
 	sed &#8216;:a; /\\$/N; s/\\\n//; ta&#8217;	Concatenate lines with trailing \<br />
 	sed &#8217;s/[ \t]*$//&#8217;	Remove trailing spaces from lines<br />
 	sed &#8217;s/\([\\`\\"$\\\\]\)/\\\1/g&#8217;	Escape shell metacharacters active within double quotes<br />
•	seq 10 | sed &#8220;s/^/      /; s/ *\(.\{7,\}\)/\1/&#8221;	Right align numbers<br />
 	sed -n &#8216;1000p;1000q&#8217;	Print 1000th line<br />
 	sed -n &#8216;10,20p;20q&#8217;	Print lines 10 to 20<br />
 	sed -n &#8217;s/.*<title>\(.*\)< \/title>.*/\1/ip;T;q&#8217;	Extract title from HTML web page<br />
 	sort -t. -k1,1n -k2,2n -k3,3n -k4,4n	Sort IPV4 ip addresses<br />
•	echo &#8216;Test&#8217; | tr &#8216;[:lower:]&#8216; &#8216;[:upper:]&#8216;	Case conversion<br />
•	tr -dc &#8216;[:print:]&#8216; < /dev/urandom	Filter non printable characters<br />
•	history | wc -l	Count lines<br />
set operations (Note you can export LANG=C for speed. Also these assume no duplicate lines within a file)<br />
 	sort file1 file2 | uniq	Union of unsorted files<br />
 	sort file1 file2 | uniq -d	Intersection of unsorted files<br />
 	sort file1 file1 file2 | uniq -u	Difference of unsorted files<br />
 	sort file1 file2 | uniq -u	Symmetric Difference of unsorted files<br />
 	join -a1 -a2 file1 file2	Union of sorted files<br />
 	join file1 file2	Intersection of sorted files<br />
 	join -v2 file1 file2	Difference of sorted files<br />
 	join -v1 -v2 file1 file2	Symmetric Difference of sorted files<br />
math<br />
•	echo &#8216;(1 + sqrt(5))/2&#8242; | bc -l	Quick math (Calculate φ). See also bc<br />
•	echo &#8216;pad=20; min=64; (100*10^6)/((pad+min)*8)&#8217; | bc	More complex (int) e.g. This shows max FastE packet rate<br />
•	echo &#8216;pad=20; min=64; print (100E6)/((pad+min)*8)&#8217; | python	Python handles scientific notation<br />
•	echo &#8216;pad=20; plot [64:1518] (100*10**6)/((pad+x)*8)&#8217; | gnuplot -persist	Plot FastE packet rate vs packet size<br />
•	echo &#8216;obase=16; ibase=10; 64206&#8242; | bc	Base conversion (decimal to hexadecimal)<br />
•	echo $((0&#215;2dec))	Base conversion (hex to dec) ((shell arithmetic expansion))<br />
•	units -t &#8216;100m/9.72s&#8217; &#8216;miles/hour&#8217;	Unit conversion (metric to imperial)<br />
•	units -t &#8216;500GB&#8217; &#8216;GiB&#8217;	Unit conversion (SI to IEC prefixes)<br />
•	units -t &#8216;1 googol&#8217;	Definition lookup<br />
•	seq 100 | (tr &#8216;\n&#8217; +; echo 0) | bc	Add a column of numbers. See also add and funcpy<br />
calendar<br />
•	cal -3	Display a calendar<br />
•	cal 9 1752	Display a calendar for a particular month year<br />
•	date -d fri	What date is it this friday. See also day<br />
•	date &#8211;date=&#8217;25 Dec&#8217; +%A	What day does xmas fall on, this year<br />
•	date &#8211;date=&#8217;@2147483647&#8242;	Convert seconds since the epoch (1970-01-01 UTC) to date<br />
•	TZ=&#8217;:America/Los_Angeles&#8217; date	What time is it on West coast of US (use tzselect to find TZ)<br />
 	echo &#8220;mail -s &#8216;get the train&#8217; P@draigBrady.com < /dev/null" | at 17:45	Email reminder<br />
•	echo &#8220;DISPLAY=$DISPLAY xmessage cooker&#8221; | at &#8220;NOW + 30 minutes&#8221;	Popup reminder<br />
locales<br />
•	printf &#8220;%&#8217;d\n&#8221; 1234	Print number with thousands grouping appropriate to locale<br />
•	BLOCK_SIZE=\&#8217;1 ls -l	get ls to do thousands grouping appropriate to locale<br />
•	echo &#8220;I live in `locale territory`&#8221;	Extract info from locale database<br />
•	LANG=en_IE.utf8 locale int_prefix	Lookup locale info for specific country. See also ccodes<br />
•	locale | cut -d= -f1 | xargs locale -kc | less	List fields available in locale database<br />
recode (Obsoletes iconv, dos2unix, unix2dos)<br />
•	recode -l | less	Show available conversions (aliases on each line)<br />
 	recode windows-1252.. file_to_change.txt	Windows &#8220;ansi&#8221; to local charset (auto does CRLF conversion)<br />
 	recode utf-8/CRLF.. file_to_change.txt	Windows utf8 to local charset<br />
 	recode iso-8859-15..utf8 file_to_change.txt	Latin9 (western europe) to utf8<br />
 	recode ../b64 < file.txt > file.b64	Base64 encode<br />
 	recode /qp.. < file.txt > file.qp	Quoted printable decode<br />
 	recode ..HTML < file.txt > file.html	Text to HTML<br />
•	recode -lf windows-1252 | grep euro	Lookup table of characters<br />
•	echo -n 0&#215;80 | recode latin-9/x1..dump	Show what a code represents in latin-9 charmap<br />
•	echo -n 0&#215;20AC | recode ucs-2/x2..latin-9/x	Show latin-9 encoding<br />
•	echo -n 0&#215;20AC | recode ucs-2/x2..utf-8/x	Show utf-8 encoding<br />
CDs<br />
 	gzip < /dev/cdrom > cdrom.iso.gz	Save copy of data cdrom<br />
 	mkisofs -V LABEL -r dir | gzip > cdrom.iso.gz	Create cdrom image from contents of dir<br />
 	mount -o loop cdrom.iso /mnt/dir	Mount the cdrom image at /mnt/dir (read only)<br />
 	cdrecord -v dev=/dev/cdrom blank=fast	Clear a CDRW<br />
 	gzip -dc cdrom.iso.gz | cdrecord -v dev=/dev/cdrom -	Burn cdrom image (use dev=ATAPI -scanbus to confirm dev)<br />
 	cdparanoia -B	Rip audio tracks from CD to wav files in current dir<br />
 	cdrecord -v dev=/dev/cdrom -audio *.wav	Make audio CD from all wavs in current dir (see also cdrdao)<br />
 	oggenc &#8211;tracknum=&#8217;track&#8217; track.cdda.wav -o &#8216;track.ogg&#8217;	Make ogg file from wav file<br />
disk space (See also FSlint)<br />
•	ls -lSr	Show files by size, biggest last<br />
•	du -s * | sort -k1,1rn | head	Show top disk users in current dir. See also dutop<br />
•	df -h	Show free space on mounted filesystems<br />
•	df -i	Show free inodes on mounted filesystems<br />
•	fdisk -l	Show disks partitions sizes and types (run as root)<br />
•	rpm -q -a &#8211;qf &#8216;%10{SIZE}\t%{NAME}\n&#8217; | sort -k1,1n	List all packages by installed size (Bytes) on rpm distros<br />
•	dpkg-query -W -f=&#8217;${Installed-Size;10}\t${Package}\n&#8217; | sort -k1,1n	List all packages by installed size (KBytes) on deb distros<br />
•	dd bs=1 seek=2TB if=/dev/null of=ext3.test	Create a large test file (taking no space). See also truncate<br />
monitoring/debugging<br />
•	tail -f /var/log/messages	Monitor messages in a log file<br />
•	strace -c ls >/dev/null	Summarise/profile system calls made by command<br />
•	strace -f -e open ls >/dev/null	List system calls made by command<br />
•	ltrace -f -e getenv ls >/dev/null	List library calls made by command<br />
•	lsof -p $$	List paths that process id has open<br />
•	lsof ~	List processes that have specified path open<br />
•	tcpdump not port 22	Show network traffic except ssh. See also tcpdump_not_me<br />
•	ps -e -o pid,args &#8211;forest	List processes in a hierarchy<br />
•	ps -e -o pcpu,cpu,nice,state,cputime,args &#8211;sort pcpu | sed &#8216;/^ 0.0 /d&#8217;	List processes by % cpu usage<br />
•	ps -e -orss=,args= | sort -b -k1,1n | pr -TW$COLUMNS	List processes by mem usage. See also ps_mem.py<br />
•	ps -C firefox-bin -L -o pid,tid,pcpu,state	List all threads for a particular process<br />
•	ps -p 1,2	List info for particular process IDs<br />
•	last reboot	Show system reboot history<br />
•	free -m	Show amount of (remaining) RAM (-m displays in MB)<br />
•	watch -n.1 &#8216;cat /proc/interrupts&#8217;	Watch changeable data continuously<br />
system information (see also sysinfo) (&#8217;#&#8217; means root access is required)<br />
•	uname -a	Show kernel version and system architecture<br />
•	head -n1 /etc/issue	Show name and version of distribution<br />
•	cat /proc/partitions	Show all partitions registered on the system<br />
•	grep MemTotal /proc/meminfo	Show RAM total seen by the system<br />
•	grep &#8220;model name&#8221; /proc/cpuinfo	Show CPU(s) info<br />
•	lspci -tv	Show PCI info<br />
•	lsusb -tv	Show USB info<br />
•	mount | column -t	List mounted filesystems on the system (and align output)<br />
#	dmidecode -q | less	Display SMBIOS/DMI information<br />
#	smartctl -A /dev/sda | grep Power_On_Hours	How long has this disk (system) been powered on in total<br />
#	hdparm -i /dev/sda	Show info about disk sda<br />
#	hdparm -tT /dev/sda	Do a read speed test on disk sda<br />
#	badblocks -s /dev/sda	Test for unreadable blocks on disk sda<br />
interactive (see also linux keyboard shortcuts)<br />
•	readline	Line editor used by bash, python, bc, gnuplot, &#8230;<br />
•	screen	Virtual terminals with detach capability, &#8230;<br />
•	mc	Powerful file manager that can browse rpm, tar, ftp, ssh, &#8230;<br />
•	gnuplot	Interactive/scriptable graphing<br />
•	links	Web browser<br />
•	xdg-open http://www.pixelbeat.org/	open a file or url with the registered desktop application<br />
miscellaneous<br />
•	alias hd=&#8217;od -Ax -tx1z -v&#8217;	Handy hexdump. (usage e.g.: • hd /proc/self/cmdline | less)<br />
•	alias realpath=&#8217;readlink -f&#8217;	Canonicalize path. (usage e.g.: • realpath ~/../$USER)<br />
•	set | grep $USER	Search current environment<br />
 	touch -c -t 0304050607 file	Set file timestamp (YYMMDDhhmm)<br />
•	python -c &#8220;import SimpleHTTPServer as ws; ws.test()&#8221;	Serve current directory tree at http://$HOSTNAME:8000/</title></oldfile>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/06/27/common-linux-cli-operations/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Keyboard shortcuts for BASH</title>
		<link>http://blog.captivereefing.com/2008/06/26/keyboard-shortcuts-for-bash/</link>
		<comments>http://blog.captivereefing.com/2008/06/26/keyboard-shortcuts-for-bash/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 21:17:09 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Linux / Unix]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/06/26/keyboard-shortcuts-for-bash/</guid>
		<description><![CDATA[Nothing to earth shaking here, below are all the keyboard shortcuts for the BASH shell that I can think of.. I know there are more and you can customize them to fit.
One note, if you habitually use &#8217;screen&#8217; Ctrl-a will not move the cursor to the line start, instead it follows the default keymapping for [...]]]></description>
			<content:encoded><![CDATA[<p>Nothing to earth shaking here, below are all the keyboard shortcuts for the BASH shell that I can think of.. I know there are more and you can customize them to fit.</p>
<p>One note, if you habitually use &#8217;screen&#8217; Ctrl-a will not move the cursor to the line start, instead it follows the default keymapping for screen and will await the command to change screens.</p>
<p>          Moving around</p>
<p>            Ctrl-b                Move the cursor one character ⇦ to the left<br />
            Ctrl-f                 Move the cursor one character ⇨ to the right<br />
            Alt-b                 Move the cursor one word ⇦ to the left<br />
            Alt-f                  Move the cursor one word ⇨ to the right<br />
            Ctrl-a                Move the cursor ⇤ to the start of the line<br />
            Ctrl-e                Move the cursor ⇥ to the end of the line<br />
            Ctrl-x-x              Move the cursor ⇤⇥ to the start, and to the end again</p>
<p>           Cut, copy and paste</p>
<p>            Backspace        Delete the character ⇦ to the left of the cursor<br />
            DEL/Ctrl-d         Delete the character underneath the cursor<br />
            Ctrl-u                Delete everything ⇤ from the cursor back to the line start<br />
            Ctrl-k                Delete everything ⇥ from the cursor to the end of the line<br />
            Alt-d                 Delete word ⇨ untill before the next word boundary<br />
            Ctrl –w              Delete word ⇦ untill after the previous word boundary<br />
            Ctrl-y                Yank/Paste prev. killed text at the cursor position<br />
            Alt-y                 Yank/Paste prev. prev. killed text at the cursor position</p>
<p>           History<br />
            Ctrl-p                Move in history one line up before this line<br />
            Ctrl-n                Move in history one line down after this line<br />
            A->                   Move in history all the lines down to the line being eneterd<br />
            Ctrl-r                 Incrementally search the line in history backward<br />
            Ctrl-s                Incrementally search the line in history forward<br />
            Ctrl-j                 End incremental search<br />
            Ctrl-g                Abort incremental search AND restore the original line<br />
            Alt-Ctrl-y           Yank/Paste arg.1 of prev. command at the cursor position<br />
            Alt-. / Alt-,         Yank/Paste last arg. Of prev. command at the cursor position</p>
<p>            Undo<br />
            Ctrl-_/Ctrl-x/Ctrl-u  Undo the last editing command<br />
            Alt-r                      undo all changes made to this line<br />
            Ctrl-l                     Clear the screen</p>
<p>           Completion<br />
            TAB                  Auto-complete a name<br />
            Alt-/                  Auto-complete a name (without smart completion)<br />
            Alt-? /TAB-TAB  List the possible completion of the preceding text<br />
            Alt-*                  Insert all possible completions of the preceding text</p>
<p>           Transpose (Twiddle)<br />
            Ctrl-t                 Transpose char. Before cursor with the character at the cursor<br />
            Alt-t                  Transpose word before the cursor with the word at the cursor</p>
<p>            Ctrl-d               Exit the current shell<br />
            Ctrl-z               Puts whatever you are running into a suspended background process.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/06/26/keyboard-shortcuts-for-bash/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Find and change file owners &#038; groups</title>
		<link>http://blog.captivereefing.com/2008/06/24/find-and-change-file-owners-groups/</link>
		<comments>http://blog.captivereefing.com/2008/06/24/find-and-change-file-owners-groups/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 19:41:57 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Linux / Unix]]></category>

		<category><![CDATA[chown]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[shell scripting]]></category>

		<category><![CDATA[unix]]></category>

		<category><![CDATA[users and groups]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/06/24/find-and-change-file-owners-groups/</guid>
		<description><![CDATA[Consolidating users or changing owners for files scattered across file systems can be a royal pain for Unix/Linux, For Winblows; I don't even want to try and imagine the quantity of Excedrin it might take to accomplish this task (but who cares about Winblows?)
The simple solution is keyed in just as it sounds...  find [...]]]></description>
			<content:encoded><![CDATA[<p>Consolidating users or changing owners for files scattered across file systems can be a royal pain for Unix/Linux, For Winblows; I don't even want to try and imagine the quantity of Excedrin it might take to accomplish this task (but who cares about Winblows?)</p>
<p>The simple solution is keyed in just as it sounds...  find all the files/directories owned by user1 and chown them to user2, we'll also say that user2 is in a new group called group2.  </p>
<p>Sure you can do a LOT of keyboard surfing and get it accomplished, how about two short lines and let the server take care of it for you....</p>
<p>First you'lll need the UID (and GID) for user1 (hint look in /etc/passwd and /etc/group) and use the following commands;</p>
<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showPlainTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">find . -uid <span style="color:#800000;color:#800000;">5015</span> -exec chown user2 <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span> \;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">find . -gid <span style="color:#800000;color:#800000;">5015</span> -exec chgrp group2 <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span> \; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>You'd be hard pressed to accomplish this much faster and without a lot of effort.</p>
<p>Happy Hacking</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/06/24/find-and-change-file-owners-groups/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How to enable .htaccess .htpasswd for Apache</title>
		<link>http://blog.captivereefing.com/2008/05/16/how-to-enable-htaccess-htpasswd-for-apache/</link>
		<comments>http://blog.captivereefing.com/2008/05/16/how-to-enable-htaccess-htpasswd-for-apache/#comments</comments>
		<pubDate>Fri, 16 May 2008 16:29:12 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Linux / Unix]]></category>

		<category><![CDATA[apache]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[password]]></category>

		<category><![CDATA[secure]]></category>

		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/05/16/how-to-enable-htaccess-htpasswd-for-apache/</guid>
		<description><![CDATA[How to enable .htaccess on .htpasswd for Apache.
Here are some short steps about how to password protect websites (or certain directories) using on an Apache webserver.  
Note:  this assumes you already have Apache installed and running correctly.  This writeup is based on Slackware 12.0 &#038; Apache 2.2.8 however the instructions should apply [...]]]></description>
			<content:encoded><![CDATA[<p>How to enable .htaccess on .htpasswd for Apache.</p>
<p>Here are some short steps about how to password protect websites (or certain directories) using on an Apache webserver.  </p>
<p>Note:  this assumes you already have Apache installed and running correctly.  This writeup is based on Slackware 12.0 &#038; Apache 2.2.8 however the instructions should apply to any previous version of Apache or Linux/Unix builds.  YMMV</p>
<p>First enabling .htaccess is simple.  Open your active httpd.conf (mine is located @ /etc/httpd/conf/httpd.conf) in your favorite editor and look for the following lines</p>
<p>    # First, we configure the “default” to be a very restrictive set of<br />
    # features.<br />
    #<br />
    Options FollowSymLinks<br />
    AllowOverride None</p>
<p>Change AllowOverride to All:<br />
    Options FollowSymLinks<br />
    AllowOverride All</p>
<p>Next, look for:</p>
<p>    #<br />
    # AllowOverride controls what directives may be placed in .htaccess files.<br />
    # It can be “All”, “None”, or any combination of the keywords:<br />
    # Options FileInfo AuthConfig Limit<br />
    #<br />
    AllowOverride None </p>
<p>Change this to:</p>
<p>    AllowOverride All </p>
<p>Restart apache:</p>
<p>    [root@server]# /usr/bin/apachectl restart</p>
<p>As simple as that .htaccess is now enabled for your server.</p>
<p>Now lets enable it for the directory/site you wish to protect.</p>
<p>Shell in and navigate to the web directory that you wish to protect</p>
<p>    [rss@server]$ cd public_html/protected<br />
    [rss@server protected]$ </p>
<p>Find out your directory path:</p>
<p>    [rss@server protected]$ pwd<br />
    /home/rss/public_html/protected </p>
<p>Create the .htpasswd file</p>
<p>    [rss@server protected]$ htpasswd -mc .htpasswd noob<br />
    New password:<br />
    Re-type new password:<br />
    Adding password for user noob<br />
    [rss@server protected]$ </p>
<p>Create an .htaccess file</p>
<p>    [rss@server protected]$ touch .htaccess </p>
<p>Add the following lines to .htaccess using your favorite text editor<br />
Note: You must change the bolded entries to your own settings</p>
<p>    AuthType Basic<br />
    AuthUserFile /home/rss/public_html/protected/.htpasswd<br />
    AuthGroupFile /dev/null<br />
    AuthName “Protected Area”<br />
    require valid-user </p>
<p>Save the file and exit to console.</p>
<p>Check permissions<br />
Note: Make sure the permissions are set correctly on the .htaccess and .htpasswd files</p>
<p>    [rss@server protected]$ ls -al .ht*<br />
    -rw-r–r– 1 rss public 129 Apr 30 00:19 .htaccess<br />
    -rw-r–r– 1 rss public 19 Apr 30 00:23 .htpasswd<br />
    [rss@server protected]$ </p>
<p>If for some reason the permissions are not set correctly, chmod them (644)</p>
<p>    [rss@server protected]$ chmod 644 .ht* </p>
<p>Add more users to the password file<br />
Note: If you want to add more users to access the directory, use the htpasswd command:</p>
<p>    [rss@server protected]$ htpasswd -m .htpasswd newuser<br />
    New password:<br />
    Re-type new password:<br />
    Adding password for user newuser </p>
<p>That's really all there is to it..  I would recommend not storing the .htpasswd file in the directory that it's protecting (or even in a directory that is being served).  Move the .htpasswd file to another location and change the AuthUserFile line within the .htaccess file to match the new location.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/05/16/how-to-enable-htaccess-htpasswd-for-apache/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Listing installed Perl Modules</title>
		<link>http://blog.captivereefing.com/2008/05/06/listing-installed-perl-modules/</link>
		<comments>http://blog.captivereefing.com/2008/05/06/listing-installed-perl-modules/#comments</comments>
		<pubDate>Tue, 06 May 2008 21:49:21 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Linux / Unix]]></category>

		<category><![CDATA[linux]]></category>

		<category><![CDATA[perl]]></category>

		<category><![CDATA[perl modules]]></category>

		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/05/06/listing-installed-perl-modules/</guid>
		<description><![CDATA[Simple one line command for listing all installed Perl modules
PLAIN TEXT
CODE:




perl -MExtUtils::Installed -e'my $inst = ExtUtils::Installed-&#62;new(); print $_, $/ for $inst-&#62;modules' 






]]></description>
			<content:encoded><![CDATA[<p>Simple one line command for listing all installed Perl modules</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">perl -MExtUtils::<span style="">Installed</span> -e<span style="color:#CC0000;">'my $inst = ExtUtils::Installed-&gt;new(); print $_, $/ for $inst-&gt;modules'</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/05/06/listing-installed-perl-modules/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Democratmobile</title>
		<link>http://blog.captivereefing.com/2008/04/18/the-democratmobile/</link>
		<comments>http://blog.captivereefing.com/2008/04/18/the-democratmobile/#comments</comments>
		<pubDate>Fri, 18 Apr 2008 19:52:07 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Politics]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/18/the-democratmobile/</guid>
		<description><![CDATA[        Official Democratic Party campaign car designed exactly the way
        Obama and Clinton lay out their campaign message
        
        "A NEW DIRECTION"
      [...]]]></description>
			<content:encoded><![CDATA[<p>        Official Democratic Party campaign car designed exactly the way<br />
        Obama and Clinton lay out their campaign message</p>
<p>        <a href='http://blog.captivereefing.com/wp-content/uploads/2008/04/car.jpg' title='democratmobile'><img src='http://blog.captivereefing.com/wp-content/uploads/2008/04/car.jpg' alt='democratmobile' /></a></p>
<p>        "A NEW DIRECTION"</p>
<p>        You figure it out. I have a headache.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/18/the-democratmobile/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Black Powder Stuff</title>
		<link>http://blog.captivereefing.com/2008/04/17/black-powder-stuff/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/black-powder-stuff/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:12:20 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/black-powder-stuff/</guid>
		<description><![CDATA[Patch Lube
An excellent patch lube for black powder can be made with 1 part anhydrous lanolin or saddle soap, 2 parts "rust inhibiting water soluble oil,"* and 1 part Murphy's Oil Soap.  Shake well and apply to patches before loading. Cleaning is much easier when using this lube.
*Arco Emulsiplex or NAPA Soluble Cutting and [...]]]></description>
			<content:encoded><![CDATA[<p>Patch Lube<br />
An excellent patch lube for black powder can be made with 1 part anhydrous lanolin or saddle soap, 2 parts "rust inhibiting water soluble oil,"* and 1 part Murphy's Oil Soap.  Shake well and apply to patches before loading. Cleaning is much easier when using this lube.</p>
<p>*Arco Emulsiplex or NAPA Soluble Cutting and Gring Oil (765-1525), Trimsol, Lyondell Satisol, or Tooltex cutting fluid can be used.</p>
<p>Thanks to George Stantis for this tip.</p>
<p>Bore Cleaners<br />
Many black powder shooters swear by Simple Green™ and of all things Windex™ "glass cleaner with vinegar."</p>
<p>If you will be using Ed's Red mostly for black powder and old chlorate primed military ammo, there is a modification to ER that may be of interest. Substitute a "fire retardant hydraulic fluid concentrate," or "rust inhibiting water soluble oil" suited for water hydraulics for four fluid oz. of the ATF in a gallon mix of ER. The resulting mix will form a stable emulsion when mixed in a 50-50 ratio with distilled water (NOT tap water). The resulting mix is very similar to "Moose Milk", though it may actually be better. To do this, mix the ER as usual, substituting the water soluble oil for 1/8 of the ATF in the mix, or 4 oz. if you are adding a quart of ATF to mix a gallon of ER. Once the ER is mixed, heat the distilled water just short of the boiling point, steaming with bubbles just beginning to form, and pour this SLOWLY into the Ed's Red while stirring. It should form a pink, soapy looking liquid like Pepto Bismol. Arco Emulsiplex or Trimsol, Lyondell Satisol, or Tooltex cutting fluid concentrate, or other water soluble cutting oils are suitable, as long as they DO NOT contain any chlorine or sulfur. That's also why you should use distilled water instead of tap water.</p>
<p>Another black powder cleaner that is being used by Civil War re-enactors is composed of  1 part rubbing alcohol (70% or 91%) 1 part hydrogen peroxide (typical 3 percent drugstore kind), and 1 part Murphy's Oil Soap or a generic equivalent.  It  cuts Black Powder (even caked on residue that has been left from one event to the next) very quickly.  Because of the alcohol, it does tend to eliminate most of the oil it comes into contact with, so be sure to lightly oil everything unless you are going to be firing immediately.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/black-powder-stuff/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Stock Finish Repair</title>
		<link>http://blog.captivereefing.com/2008/04/17/stock-finish-repair/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/stock-finish-repair/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:11:57 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/stock-finish-repair/</guid>
		<description><![CDATA[This tip isn't quite a cleaner/lube but it is worth while.  To repair scratches on varnished or epoxy finished stocks try automotive "clear coat" touch up paint available at auto parts stores in little bottles with a brush in the touch up paint section.
]]></description>
			<content:encoded><![CDATA[<p>This tip isn't quite a cleaner/lube but it is worth while.  To repair scratches on varnished or epoxy finished stocks try automotive "clear coat" touch up paint available at auto parts stores in little bottles with a brush in the touch up paint section.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/stock-finish-repair/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rust Removal</title>
		<link>http://blog.captivereefing.com/2008/04/17/rust-removal/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/rust-removal/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:11:39 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/rust-removal/</guid>
		<description><![CDATA[Brake Fluid
For rust removal, try automotive brake fluid.  For light rust rub it on liberally with a patch, allow it to sit for a couple of minutes and wipe off.  For heavily rusted items swab liberally with brake fluid and allow to sit over night.  Burnish the finish with a wool pad [...]]]></description>
			<content:encoded><![CDATA[<p>Brake Fluid<br />
For rust removal, try automotive brake fluid.  For light rust rub it on liberally with a patch, allow it to sit for a couple of minutes and wipe off.  For heavily rusted items swab liberally with brake fluid and allow to sit over night.  Burnish the finish with a wool pad or #0000 steel or bronze wool.  Brake fluid may be damaging to some wood finishes so make sure you keep it on the metal.</p>
<p>Electrolysis Rust Removal<br />
You can remove rust from metal using electrolysis, and it will not harm the bluing. The main advantage to this method is it gets all the rust in hard to reach places. You will need</p>
<p>    *  A plastic container that will hold the part and electrolysis solution.<br />
    *  Steel rod.  DO NOT USE STAINLESS STEEL AS THIS WILL PRODUCE HARMFUL BYPRODUCTS.<br />
    * Water<br />
    * Arm &#038; Hammer Washing Soda (not baking soda. Washing soda can be found in your local grocery store with the laundry detergent. If you cannot find washing soda, pour some baking soda-sodium bicarbonate into a pan and heat it over low-medium heat. Water and carbon-dioxide will cook-off leaving washing soda-sodium carbonate. )  Another source is swimming pool "PH Increaser." which is labeled 100% sodium carbonate. [Thanks to Bob Head for this hint]<br />
    * Battery charger or other high amperage power supply.</p>
<p>Cautions: Wear eye protection and rubber gloves when working with this solution is very alkaline and can cause irritation. The electrolysis process breaks down water into its component parts, hydrogen and oxygen, which can be explosive. Work outside or in a very well ventilated area.  Be sure your battery charger/power supply is unplugged before attaching or touching the leads.</p>
<p>In the container, mix 1 tablespoon of washing soda for each gallon of water to make up your solution. Be sure the washing soda is thoroughly dissolved. Place a steel rod either through the part to be cleaned (use o-rings to prevent the part from touching the rod), or numerous rods around the inside of your container. Connect these rods with wire; these will be the anode. You must be sure that the part to be cleaned is not touching the rod(s). Suspend the part in the solution with steel cable or wire so that it makes a good electrical contact with the part; this will become the cathode. Connect the negative lead (black) to the part being cleaned, connect the positive (red) lead to the rod(s), then plug in the charger.  You will immediately begin to see bubbles; this is hydrogen and oxygen as the water breaks down. Allow the part to "cook" for 3-4 hours. The time is dependent on the size of the part, amount of rust, and the current of the power supply. After you remove the part, immediately clean and dry it off, then coat it with a good quality gun oil or rust preventative oil.</p>
<p>Thanks to Roy Seifert for this tip</p>
<p>Roy reports that he used this process on a 1911 frame that had a lot of surface rust all throughout the inside. He set the frame upside down on wooden blocks in the electrolysis solution and placed a rod with o-rings through the magazine well. He used a 1.5 amp trickle charger and left it for about 4 hours. When finished, the frame was completely free of rust, and the bluing was intact.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/rust-removal/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Case  Sizing Lubricants</title>
		<link>http://blog.captivereefing.com/2008/04/17/case-sizing-lubricants/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/case-sizing-lubricants/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:11:15 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/case-sizing-lubricants/</guid>
		<description><![CDATA[Spray Lube
The spray-on case lubes are probably the best thing to happen to reloading in years.  You can make your own spray case sizing lube in bulk by mixing liquid lanolin and 99% isopropyl alcohol. (While you can (kind of) use 91% isopropyl  alcohol,  its higher water content causes the lanolin to [...]]]></description>
			<content:encoded><![CDATA[<p>Spray Lube<br />
The spray-on case lubes are probably the best thing to happen to reloading in years.  You can make your own spray case sizing lube in bulk by mixing liquid lanolin and 99% isopropyl alcohol. (While you can (kind of) use 91% isopropyl  alcohol,  its higher water content causes the lanolin to settle out and it must be shaken frequently during use.  The more common 70% isopropyl "rubbing alcohol" will not work at all as its water content is much to high.) </p>
<p>Liquid lanolin, which is a refined lanolin oil with the solid fats removed (the reason why solid anhydrous lanolin doesn't work well in this application) is available from health food stores and sources specializing in ingredients for cosmetics.  You want to get pure liquid lanolin without additives. Online sources include VitaGlo (http://www.vitaglo.com/7730.html) and Select Oils (http://www.selectoils.com/item--Lanolin-Liquid--SO-LanolinLiquid.html). </p>
<p>I just recently discovered that my local Safeway store carries 99 percent isopropyl in their drug/cosmetic isle for $0.99 for a 16 ounce bottle.  Ninety-nine percent isopropyl alcohol is also available from many large paint stores (used for some finishes), some electronics stores (it's used for cleaning electronics) or local industrial chemical suppliers.  </p>
<p>A solution of 1 part liquid lanolin and 4 to 5 parts parts 99 percent isopropyl alcohol (4 oz of liquid lanolin to16 - 20 oz of isopropyl) works well. When mixing you may find that the lanolin mixes better if you warm both the alcohol and lanolin in a bath of warm water to about 105 - 110 degrees F before mixing.  DO NOT WARM EITHER OF THEM OVER AN OPEN FLAME!   Once the solutions are warm, pour together, mix thoroughly, allow the mix to cool (mix occasionally as it cools) and store in an air tight container to prevent water from being absorbed by the isopropyl.  </p>
<p>For a spray bottle you can use an old commercial spray lube bottle or an old pump hair spray bottle that has been thoroughly cleaned. To apply the lube, spread the cases in a single layer on a clean surface like an oven tray (those disposable aluminum oven liner trays are great and prevent the wrath of your chef  when it is discovered that the cookie trays were used) and lightly and evenly spray the cases.  Allow the cases to sit for a couple of minutes, roll the cases around and lightly spray again.  Wait until the alcohol has evaporated (about 5 minutes) and start sizing.  Properly lubed cases will have a slightly greasy feel to them without feeling slimy.  </p>
<p>Another neat idea for spraying the cases is to put them in a plastic bag, spray, and then mix the cases, dump out on some newspaper, and let dry.  Less messy than putting the cases on an oven tray and less likely to get you in trouble with the head chef.</p>
<p>Thanks to Steve Dzupin for this tip.</p>
<p>One of the advantages of using sprayed on lanolin as a case lube is that, in the quantities used, any residual lube has no effect on powder or primers.</p>
<p>Solid "Wipe On" Lubes<br />
You can also use plain anhydrous lanolin straight from the can (but not as conveniently) for sizing by putting a little bit  on your fingers (just lightly rub your fingers across the lanolin) and then rubbing the cases.  "Mink Oil," a refined lanolin leather preservative also works well as a case lube.</p>
<p>Many large drug stores have bulk anhydrous lanolin or they will order it for you, or you can order in it 4, 8, or 16 ounce containers,  from Majestic Mountain Sage, 881 West 700 North Ste 107, Logan, Utah 84321, Phone: 435-755-0863, or online at: http://www.thesage.com/catalog/FixedOil.html#Lanolin, and from Select Oils at http://www.selectoils.com/item--Lanolin--SO-Lanolin.html. </p>
<p>Many people have reported that they have used a little bit of STP oil treatment on their fingers or commercial water based silicone cable pulling lube as a sizing lube.</p>
<p>If you are still using pads to roll your cases on for resizing you can simply use regular undyed dishwashing liquid.  Reports are that it works as some commercial liquid case lubes. Simply put a very small amount on your pad and rub it in with your fingers. Roll your cases across the pad and resize.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/case-sizing-lubricants/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chemical Case Cleaning Solutions</title>
		<link>http://blog.captivereefing.com/2008/04/17/chemical-case-cleaning-solutions/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/chemical-case-cleaning-solutions/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:10:52 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/chemical-case-cleaning-solutions/</guid>
		<description><![CDATA[While tumbling cases in an abrasive media provides the best finish, extremely dirty cases can be decapped first (using a non-sizing die) and then washed in one of the following solutions.  The final rinse in soapy water helps prevent tarnishing.  All of these methods were approved by Frankford Arsenal and will not weaken [...]]]></description>
			<content:encoded><![CDATA[<p>While tumbling cases in an abrasive media provides the best finish, extremely dirty cases can be decapped first (using a non-sizing die) and then washed in one of the following solutions.  The final rinse in soapy water helps prevent tarnishing.  All of these methods were approved by Frankford Arsenal and will not weaken your brass.</p>
<p>    * A 5 percent solution of citric acid (available from your drugstore) and warm water for about 10 minutes.  If your water is very hard increase the amount of citric acid.  You can add some Dawn™ or Cascade™ dishwasher liquid soap  (which does not contain ammonia--be careful some do), to the solution for extra grease cutting ability.  Follow with a rinse in hot soapy water (Ivory™ works well) and allow to dry.<br />
    * A solution of 1 quart of white vinegar and 2 tablespoons of salt.  Soak with some agitation for 15 to 20 minutes and follow with a rinse of soapy hot water and allow to dry.<br />
    * A solution of 1 quart of water, 1 cup white vinegar, 1/2 cup lemon juice, 1/4 cup laundry or dishwashing detergent, 1/8 cup salt.  Soak with some agitation for 15 to 20 minutes and follow with a rinse of soapy hot water and allow to dry.  This may leave brass with a slight pinkish cast which will disappear with a short tumble in media.<br />
    * Military arsenals use a heated 4 percent sulfuric acid dip with a little potassium dichromate added.  The solution is heated until bubbles rise slowly without it boiling and the cases are dipped into it for 4 -5 minutes using a basket of copper screening or plastic.  A final rinse using  plain hot water is followed by hot water with Ivory™ soap in it and the cases are left to drain and dry.  Because of the use of heated sulfuric acid this method is probably impractical for home use but is given here to show what can be safely used.</p>
<p>Cases which have been fired several times and which show signs of carbon build up internally can be rinsed in straight paint &#038; varnish makers (P&#038;VM) naphtha available at any paint store.  Decap, soak for 5 - 10 minutes, drain, allow to air dry and then tumble as usual.  Cases will be sparkling clean inside and out but not any shinier.</p>
<p>An interesting idea is to use an "air stone" and a small air pump from a fish aquarium tank to agitate the liquid cleaning solutions.</p>
<p>Thanks to Randy Wood for this tip.</p>
<p>Another case cleaning method is the use of an ultrasonic cleaning unit.  These units are available from several online sources and the biggest problem is finding a reasonably priced unit with about a 2 liter capacity.  While you can only clean small quantities of cases at a time this way they will be clean as new, inside and out.  Once you've acquired the unit you'll need to also acquire a glass beaker of sufficient size for your use and make a cover and beaker holder.</p>
<p>Cut a piece of Plexiglas to cover the tank and cut a hole the size of  your beaker (use a fly cutter and a drill press or jigsaw it out). Make a collar for the beaker out of plastic foam that fits very snugly so the beaker can be raised or lowered. You want the beaker to not sit on the pan of the cleaner.</p>
<p>Fill the cleaner tank with water and by adjusting the level of water in the tank, the liquid in the beaker, and depth of the beaker in the water it can be "tuned" so that the liquid in the beaker appears to boil while the water in the tank is calm. This has a major effect on how long it takes to clean the cases.</p>
<p>For cleaning you can use either of these procedures but the second one leaves the cases the shiniest.<br />
24 minutes - 50-50 Vinegar and water + 1 Drop Dish Soap per<br />
     8 ounces water  Use cool water.  Do not use hot water!!!<br />
8 minutes - Baking Soda &#038; water (1 grain BS per ounce of<br />
     water)<br />
8 minutes - Hot Water<br />
8 minutes - Distilled Water 	24 minutes - 50-50 Vinegar and water + 1 Drop Dish Soap per<br />
     8 ounces water  Use cool water.  Do not use hot water!!!<br />
6 minutes - Birchwood Casey Case Cleaner*<br />
6 minutes - Hot Water<br />
6 minutes - Distilled Water<br />
* The Birchwood Casey case cleaner is listed as their "Brass Cartridge Case Cleaner # 33845"</p>
<p>This idea was originally presented on the 6 mm Benchrest site at http://www.6mmbr.com/ultrasonic.html by Jason Baney, and more info and test results are published there.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/chemical-case-cleaning-solutions/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Case Tumbling Media</title>
		<link>http://blog.captivereefing.com/2008/04/17/case-tumbling-media/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/case-tumbling-media/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:10:27 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/case-tumbling-media/</guid>
		<description><![CDATA[Many pet stores carry ground corncob media for small pet bedding.  It is usually a little coarser than most normal tumbling media but it should still be perfect for tumbling cases (and not get stuck in flash holes).  Prices at my local Petsmart were about 2/3 of the shooting stuff.    [...]]]></description>
			<content:encoded><![CDATA[<p>Many pet stores carry ground corncob media for small pet bedding.  It is usually a little coarser than most normal tumbling media but it should still be perfect for tumbling cases (and not get stuck in flash holes).  Prices at my local Petsmart were about 2/3 of the shooting stuff.    For ground walnut shells many pet stores sell it in the same grit size as the shooting stuff as "lizard litter" or "bird cage litter." The local price seems to be about a 30 percent cheaper than the shooting product.</p>
<p>You can also try your phone book's yellow pages for an industrial abrasives dealer.  While you'll have to buy the corn cob or walnut media in 50 pound bags from them the price is usually about half (or less) of the price from firearms related sources, and it should keep you in clean tumbling media for the next several years.  For an extra high polish add a small amount of non-ammonia containing automotive rubbing compound to the corn cob media and run your tumbler for a few minutes before adding the cases.</p>
<p>A word to the wise.  If you share your home with furpeople keep your tumbling media covered or you may find some strange "cases" in it.  Cats think its a dandy litter box filler.</p>
<p>Another case cleaning method that works well in rotary tumbler, like the 1-gallon Thumblers Tumblers, is to use the following media.</p>
<p>    2 lb yellow or white corn meal<br />
    1 cup plain table salt<br />
    1/4  cup corn starch<br />
    5 or 6 pieces of scrap 2 x 2 or smaller wood cut into blocks</p>
<p>Add everything to the tumbler, close up the drum, and turn it on for a couple hours.  Remove cases from tumbler, shake out the media from cases.  You can blow them clean with an airgun or rinse them off if you like.  The wooden blocks seems to knock the brass around and keeps media moving in and out of cases. They also seem to add a little extra friction to help polish and clean.  Note that corn meal does not clog the flash holes, it's dirt cheap, and lasts for hundreds of rounds!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/case-tumbling-media/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Bore Paste</title>
		<link>http://blog.captivereefing.com/2008/04/17/bore-paste/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/bore-paste/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:09:56 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/bore-paste/</guid>
		<description><![CDATA[An excellent bore polishing paste that works as well as JB's can be made from equal parts of  BonAmi™, paste wax (like Johnson &#038; Johnson or Butchers), and light oil.  The BonAmi is the "doesn't scratch" product.  Regular abrasive cleansers may be too harsh for use in a bore.
Another old standby is [...]]]></description>
			<content:encoded><![CDATA[<p>An excellent bore polishing paste that works as well as JB's can be made from equal parts of  BonAmi™, paste wax (like Johnson &#038; Johnson or Butchers), and light oil.  The BonAmi is the "doesn't scratch" product.  Regular abrasive cleansers may be too harsh for use in a bore.</p>
<p>Another old standby is to use a hand type automobile rubbing compound and a larger than normal sized bore brush (say, one size larger--.25 in a .22 bore, .33 in a .30, etc.).  </p>
<p>For both of these methods you will need a rod that allows the tip to rotate as it passes through the bore.</p>
<p>To use either of these solutions strip the action and clamp horizontally in padded vise jaws. Clean the barrel normally.  Then, run the rod through the bore from the breach end, attach the oversized brush and coat with the compound.  The pull it back through the bore to the chamber (don't allow it to clear the chamber, to help keep "stuff" out of the action) and repeat this 25 or 30 times.  Then with the brush outside the muzzle remove the brush and then pull the rod out of the barrel.  Then attach a proper sized jag and a clean patch to the rod and from the breach work the patch back and forth several times.  Repeat this with clean patches until the patch comes out clean.</p>
<p>Thoroughly flush the chamber and action with solvent to remove any grit, and then reclean the bore and chamber with normal bore cleaner.  Your bore will be noticeable cleaner and smoother.</p>
<p>I recently tested some MAAS Metal Polishing Creme made by MAAS International.  While not designed as a bore paste it did a very nice job on smoothing out several barrels and left them very clean and shiny.  First clean the barrel normally with both regular bore cleaner and a copper remover.  Then coat a patch with the MAAS and using a tight fitting jag work it through the bore using a series of short strokes.  Repeat several times with a new patch and polish and then final clean with bore cleaner to remove any residue.  It is not as aggressive as JB or the above homemade stuff so it may not work as well on a really rough bore.  The MAAS Polishing Creme is available at some Walmart, Home Depots, Walgreens, ACE, Tru-Serv, others in a 2 ounce size for about $4 and on line at www.maasinc.com in a 4 ounce size for about $12.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/bore-paste/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Lead Removal</title>
		<link>http://blog.captivereefing.com/2008/04/17/lead-removal/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/lead-removal/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:09:34 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/lead-removal/</guid>
		<description><![CDATA[
Liquid Solution
For really stubborn lead removal try a 50/50 mix of  3% Hydrogen Peroxide (the common drug store variety) and white vinegar.  Plug the bore, fill it up using a dropper or syringe and let it stand for 2 to 3 minutes.  (Do not let it stand for too long.) You may [...]]]></description>
			<content:encoded><![CDATA[<p>
Liquid Solution<br />
For really stubborn lead removal try a 50/50 mix of  3% Hydrogen Peroxide (the common drug store variety) and white vinegar.  Plug the bore, fill it up using a dropper or syringe and let it stand for 2 to 3 minutes.  (Do not let it stand for too long.) You may get some foaming so protect the barrel's external finish as this solution is not kind to bluing. Drain and wipe out the black muck that used to be lead and then immediately clean well with bore cleaner.</p>
<p>Thanks to Joe Sledge for this recipe.</p>
<p>Note<br />
While most people have used this solution without a problem there have been reports of this solution pitting some mild steel barrels.  The factors involved in this seem to be the type of steel, the presence of rust in the barrel, and excessively long soak times leading to chemical changes in the solution.  I strongly recommend not letting this solution soak more than 2 to 3 minutes.</p>
<p>Pure turpentine has reportedly also been used as a lead remover. </p>
<p>Lead Removal Cloth<br />
Lead deposits on the face of revolver cylinders and similar places can be removed with a lead wiping cloth prepared as follows.</p>
<p>Mix the following ingredients</p>
<p>    500 gr - 400 grit or finer aluminum oxide powder<br />
    450 gr - kerosene or #2 fuel oil<br />
       4 gr - lemon oil (for a more pleasant smell)<br />
       5 gr - ammonium chloride</p>
<p>Evenly saturate a soft thick cotton cloth or flannel with the solution and allow to dry.  (There is no reason it won't work wet though.)</p>
<p>Carefully remove any very heavy lead deposits with a scraper and then wipe the remainder with the cloth to remove.</p>
<p>Notes:  The active ingredient in commercial liquid lead remover products is Ammonium Oleate (CAS 544-60-5).  It is however difficult to get.  Most of the formulas are basically ammonium oleate, ethanol, and some petroleum distillates as a carrier.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/lead-removal/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Gun Oil Substitutes</title>
		<link>http://blog.captivereefing.com/2008/04/17/gun-oil-substitutes/</link>
		<comments>http://blog.captivereefing.com/2008/04/17/gun-oil-substitutes/#comments</comments>
		<pubDate>Thu, 17 Apr 2008 17:09:12 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
		
		<category><![CDATA[Firearm Cleaners &amp; Lubricants]]></category>

		<category><![CDATA[firearms]]></category>

		<guid isPermaLink="false">http://blog.captivereefing.com/2008/04/17/gun-oil-substitutes/</guid>
		<description><![CDATA[Keep in mind that no matter what lubricant you use, you should  use
the minimum amount of lube possible.  You want it lubricated and not an oil field.
Synthetic Automotive Oils
Synthetic automotive oils (such as Quaker State High Performance Synthetic) work well as general lubricants and because of their detergent capabilities they will help to [...]]]></description>
			<content:encoded><![CDATA[<p>Keep in mind that no matter what lubricant you use, you should  use<br />
the minimum amount of lube possible.  You want it lubricated and not an oil field.</p>
<p>Synthetic Automotive Oils<br />
Synthetic automotive oils (such as Quaker State High Performance Synthetic) work well as general lubricants and because of their detergent capabilities they will help to remove "crud."   (Synthetic oils handle low temperatures better than regular oils.)  Just remember, as with any lubricant, not to over lube things. Valvoline Semi-Synthetic Power Steering Fluid has also been used with great success by many folks as their normal lubricant.</p>
<p>Air Conditioning Refrigerant Oil<br />
Air conditioning refrigerant oil, available at most auto dealers and auto stores, is highly penetrative and makes an excellent lube and a rust preventative.  It works at high temperatures and very low ones (won't freeze even when mixed with Freon) and should be just the ticket for Alaskan use.</p>
<p>Slick Stuff<br />
This very "oily", (i.e. slick, greasy) lubricant appears to adhere very well to metal, with little or no creep. Thus it does not appear to drain from slides and parts during extended storage.  From the formula it appears that it might not be suitable at very low temperatures.</p>
<p>    2 parts Dexron II or III automatic transmission fluid<br />
    1 Part Mobil-1 Synthetic Oil, 30 weight, or 10W-30<br />
    1 Part STP Oil Treatment (the stuff for "old" cars w/ over 30,000 mi.)</p>
<p>Thanks to John Nichols for this tip</p>
<p>Amsoil<br />
Another excellent home brew lube is Amsoil Synthetic ATF with some lanolin added to make it even slicker.   A synthetic grease from MS Moly called Arctic Grade 67 also makes a great lube especially for cold weather.  It is a totally synthetic moly grease with the consistency of chocolate mousse. It does not run, weep or smell (very important for the SAF (spousal acceptance factor)). It is reported to work fine at -30 degrees.</p>
<p>Thanks to Roger Rothschild  for this tip.</p>
<p>Slippery Stuff<br />
Try 80 percent Marvel Mystery Oil mixed with 20 percent  Slick 50 .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.captivereefing.com/2008/04/17/gun-oil-substitutes/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
