<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://bitpost.com/w/index.php?action=history&amp;feed=atom&amp;title=Scripts</id>
	<title>Scripts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://bitpost.com/w/index.php?action=history&amp;feed=atom&amp;title=Scripts"/>
	<link rel="alternate" type="text/html" href="https://bitpost.com/w/index.php?title=Scripts&amp;action=history"/>
	<updated>2026-04-19T07:04:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://bitpost.com/w/index.php?title=Scripts&amp;diff=3695&amp;oldid=prev</id>
		<title>M at 15:47, 13 April 2016</title>
		<link rel="alternate" type="text/html" href="https://bitpost.com/w/index.php?title=Scripts&amp;diff=3695&amp;oldid=prev"/>
		<updated>2016-04-13T15:47:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:47, 13 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;My scripts:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;My scripts:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sc                              show most-common quick-scripts&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sc                              show most-common quick-scripts - &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;let&amp;#039;s use that &lt;/ins&gt;and not &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;maintain a list here too!&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; greplogs blah                   search all my log files (named ToDo.txt) for &amp;quot;blah&amp;quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; greplogs blah &lt;/del&gt;-&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;C 3              search all my log files (named ToDo.txt), &lt;/del&gt;and &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;show 3 surrounding lines of context&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; grepcode blah -C 3              same, but search code files underneath the current dir (h|hpp|cpp|pl|php)&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; restart_process_as_needed.pl name=#path/file# &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;                                 checks for process named &amp;#039;file&amp;#039;; if &lt;/del&gt;not &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;found, starts path/file&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; pk substring                    prompt to kill all processes with &amp;#039;substring&amp;#039;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;General-purpose:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;General-purpose:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  cp -axv drive drive_backup      clone an unmounted linux system&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  cp -axv drive drive_backup      clone an unmounted linux system&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>M</name></author>
	</entry>
	<entry>
		<id>https://bitpost.com/w/index.php?title=Scripts&amp;diff=3542&amp;oldid=prev</id>
		<title>M at 16:38, 24 March 2016</title>
		<link rel="alternate" type="text/html" href="https://bitpost.com/w/index.php?title=Scripts&amp;diff=3542&amp;oldid=prev"/>
		<updated>2016-03-24T16:38:49Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:38, 24 March 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{| class=&quot;mw-collapsible mw-collapsed wikitable&quot;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! script favs&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|-&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| COMMANDS WORTH REMEMBERING&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;My scripts:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;My scripts:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sc                              show most-common quick-scripts&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  sc                              show most-common quick-scripts&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l125&quot;&gt;Line 125:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 120:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ec2-ubuntu-ssh    ssh to amazon ec2 server&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ec2-ubuntu-ssh    ssh to amazon ec2 server&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  mp3search         search (and optionally copy mp3s&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  mp3search         search (and optionally copy mp3s&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>M</name></author>
	</entry>
	<entry>
		<id>https://bitpost.com/w/index.php?title=Scripts&amp;diff=3541&amp;oldid=prev</id>
		<title>M: Created page with &quot;{| class=&quot;mw-collapsible mw-collapsed wikitable&quot; ! script favs |- | COMMANDS WORTH REMEMBERING  My scripts:  sc                              show most-common quick-scripts  gr...&quot;</title>
		<link rel="alternate" type="text/html" href="https://bitpost.com/w/index.php?title=Scripts&amp;diff=3541&amp;oldid=prev"/>
		<updated>2016-03-24T16:38:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot; ! script favs |- | COMMANDS WORTH REMEMBERING  My scripts:  sc                              show most-common quick-scripts  gr...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| class=&amp;quot;mw-collapsible mw-collapsed wikitable&amp;quot;&lt;br /&gt;
! script favs&lt;br /&gt;
|-&lt;br /&gt;
| COMMANDS WORTH REMEMBERING&lt;br /&gt;
&lt;br /&gt;
My scripts:&lt;br /&gt;
 sc                              show most-common quick-scripts&lt;br /&gt;
 greplogs blah                   search all my log files (named ToDo.txt) for &amp;quot;blah&amp;quot;&lt;br /&gt;
 greplogs blah -C 3              search all my log files (named ToDo.txt), and show 3 surrounding lines of context&lt;br /&gt;
 grepcode blah -C 3              same, but search code files underneath the current dir (h|hpp|cpp|pl|php)&lt;br /&gt;
 restart_process_as_needed.pl name=#path/file# &lt;br /&gt;
                                 checks for process named &amp;#039;file&amp;#039;; if not found, starts path/file&lt;br /&gt;
 pk substring                    prompt to kill all processes with &amp;#039;substring&amp;#039;&lt;br /&gt;
General-purpose:&lt;br /&gt;
 cp -axv drive drive_backup      clone an unmounted linux system&lt;br /&gt;
 ps ax|grep blah                 show running processes with &amp;quot;blah&amp;quot; in them&lt;br /&gt;
 lsof -c cp                      show open files for any process starting with &amp;quot;cp&amp;quot;&lt;br /&gt;
 lspci                           list all the hardware using the PCI bus (video cards, etc)&lt;br /&gt;
 watch #command#                 repeat the command every 2 secs (default), showing output&lt;br /&gt;
 tail -f #logfile#               display the tail end of the logfile, in realtime&lt;br /&gt;
 shutdown -rF now                reboot, forcing an fsck on startup (or, put a [forcefsck] file in drive root)&lt;br /&gt;
 fuser -m /dev/hdb1              find open files on a drive, then processes that have the file(s) open&lt;br /&gt;
   /dev/hdb1: 538&lt;br /&gt;
 ps auxw|grep 538&lt;br /&gt;
   donncha 538 0.4 2.7 219212 56792 ? SLl Feb11 11:25 rhythmbox&lt;br /&gt;
 wc -l file                      count lines - can pipe to it too&lt;br /&gt;
 find / -name &amp;quot;libjpeg*&amp;quot;         brute-force find (in this case, all libraries starting with jpeg...)&lt;br /&gt;
 iostat -dx 5                    report on drive % utilization etc (&amp;quot;emerge systat&amp;quot; to get it)&lt;br /&gt;
 iotop                           top for io, of course&lt;br /&gt;
 hdparm -t /dev/sda              tests actual speed of hard drive&lt;br /&gt;
Ubuntu-specific:&lt;br /&gt;
 xrandr --output DVI-I-2 --off &amp;amp;&amp;amp; xrandr --output DVI-I-2 --auto --right-of DVI-I-1     fixes lost monitor, also try arandr&lt;br /&gt;
 sudo software-center [XXX.deb]                                                         to go to software center; specify a deb file to install (steam etc).&lt;br /&gt;
 sudo unity-control-center                                                              all settings; also a pathway to upgrading and selecting nvidia driver&lt;br /&gt;
 sudo lsb_release -a                                                                    display the ubuntu version&lt;br /&gt;
Gentoo-specific (see [http://news.thedigitalmachine.com/category/chatter/gentoo-notes/ blog] for USE flag notes):&lt;br /&gt;
 elogviewer                      X app to list installed packages including installation notes&lt;br /&gt;
 genlop -lu                      show the history of merged and unmerged packages&lt;br /&gt;
 eix #search#                    search for all packages (available AND installed)&lt;br /&gt;
 eix --world -c                  condensed list of all packages in your [world]&lt;br /&gt;
 emerge -Davu blah               emerge package blah (if needed), confirming first&lt;br /&gt;
 dispatch-conf                   handles updating of config files after emerge, see /etc/dispatch-conf.conf&lt;br /&gt;
 equery uses #package#           show USE flags of package&lt;br /&gt;
 equery depends #pkg#            show packages that depend on package&lt;br /&gt;
 equery belongs #file#           show the package to which the file belongs&lt;br /&gt;
 equery hasuse #flag#            shows packages that have the USE flag&lt;br /&gt;
 equery depgraph --depth=# #pkg# shows the entire dependency tree for pkg&lt;br /&gt;
 eix-sync                        grabs latest package list, updates portage and eix (usually called via cron)&lt;br /&gt;
 emerge --emptytree --update world  CAREFUL, this reinstalls EVERYTHING :&amp;gt;&lt;br /&gt;
Apps:&lt;br /&gt;
 alsamixer                       set 7.1-channel HD audio volume levels&lt;br /&gt;
 alsa-config                     test, set optimal audio levels&lt;br /&gt;
 mythfilldatabase                fill TV listings database&lt;br /&gt;
For development:&lt;br /&gt;
 git rebase --hard HEAD          throw away your local changes that have not yet been committed&lt;br /&gt;
 git rebase --hard master        force the current branch to match master (losing ALL commits!)&lt;br /&gt;
 cvs history -c [file]           get list of revisions for [file]&lt;br /&gt;
 cvs diff -r 1.2 [file]          compare past revision to current&lt;br /&gt;
 cvs diff -r 1.3 -r 1.2 [file]   compare two revisions&lt;br /&gt;
&lt;br /&gt;
Run sc to get the latest list:&lt;br /&gt;
 -----------------------------------------------&lt;br /&gt;
 /^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\&lt;br /&gt;
 -----------------------------------------------&lt;br /&gt;
           useful commands and scripts&lt;br /&gt;
 _______________________________________________&lt;br /&gt;
 \v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/^\v/&lt;br /&gt;
  ---------------------------------------------&lt;br /&gt;
 &lt;br /&gt;
 i3[scriptname]    run an i3-specific script&lt;br /&gt;
 equery files pkg  show package files, use |less&lt;br /&gt;
 elogv[iewer]      browse recent emerges and comments&lt;br /&gt;
 edit_fluxbox_menu edit and apply fb menu changes&lt;br /&gt;
 edit_firewall     edit, restart iptables w/screen&lt;br /&gt;
 mdb-[]            access db tools&lt;br /&gt;
 gtdm;gw;gd;gwa    go to tdm|wimpy|dune|wally via ssh&lt;br /&gt;
 greplogs [term]   search logs for term [-C 3]&lt;br /&gt;
 grepcode [term]   search code in curr dir for term&lt;br /&gt;
 ds [dir]          get directory sizes&lt;br /&gt;
 pk [proc_regex]   kill matches - type ALL for -9&lt;br /&gt;
 lsof -c [proc]    show open files for process&lt;br /&gt;
 which|whereis app show app location|paths&lt;br /&gt;
 alsamixer         adjust sound levels&lt;br /&gt;
 eq                finally an eq in linux, yay!&lt;br /&gt;
 watch [command]   repeatedly run command&lt;br /&gt;
 rs                restore screen (w/detach)&lt;br /&gt;
 st;gt             search/get torrents&lt;br /&gt;
 post_torrent      run from m@wimpy:rrip/flac (or mp3)&lt;br /&gt;
 srd [#]           show most recent downloads&lt;br /&gt;
 move_and_resymlink symlink destdir&lt;br /&gt;
 resymlink symlink destdir (if file is already there)&lt;br /&gt;
 rm_torrent.pl     torrent cleanup; run for usage&lt;br /&gt;
 extract_tordir  extract dir from .torrent&lt;br /&gt;
 ls_broken_symlinks uses curr dir&lt;br /&gt;
 ls_nonsymlinks     uses curr dir&lt;br /&gt;
 rm_broken_symlinks uses curr dir, WILL rm THEM&lt;br /&gt;
 td;etd            show/edit active todo w/cvs&lt;br /&gt;
 top               top resource-consuming procs&lt;br /&gt;
 apachetop -f log  site-specific apache requests&lt;br /&gt;
 ex;em             emacs with/without X&lt;br /&gt;
 uc;cm             cvs update/commit (no message)&lt;br /&gt;
 sp;ep             search/edit private data&lt;br /&gt;
 edit_spam_[rules|settings]  what it says&lt;br /&gt;
 edit_sieve_rules  edit mailfilter rules&lt;br /&gt;
 tree -fid -L 1    great tree display of dir &amp;amp; files&lt;br /&gt;
 edit_torrent_[]   shows (common) or rss (rare)&lt;br /&gt;
 search_xbmc_keys  search key file for term&lt;br /&gt;
 edit_world        edit portage master pkg list&lt;br /&gt;
 xscreensaver-demo then select Disable to turn off&lt;br /&gt;
 recordmydesktop   does what it says&lt;br /&gt;
 bandwidth         monitor current bw usage&lt;br /&gt;
 edit_rsync_jobs   edit bp&amp;lt;-&amp;gt;tdm nightly rsync&lt;br /&gt;
 &lt;br /&gt;
 trac-tda $1 $2    trac admin tool, RUN AS ROOT&lt;br /&gt;
 erase_trac_ticket_block 17 20 blah  (run as root)&lt;br /&gt;
 update_ampache_tda update music catalog, RUN AS ROOT&lt;br /&gt;
 edit_gentoo_grub_cfg set up gentoo kernels on 3-boot&lt;br /&gt;
 &lt;br /&gt;
 htdj/*_scripts/push_release(.bat) &lt;br /&gt;
 get_ampache_official changes &lt;br /&gt;
 publish_hangthedj_ampache_module &lt;br /&gt;
 get_ampache_official changes &lt;br /&gt;
 cdh;huc;hcm;hpush scripts to manage hangthedj repos&lt;br /&gt;
                   also see scripts/git_* helpers&lt;br /&gt;
 ec2-ubuntu-ssh    ssh to amazon ec2 server&lt;br /&gt;
 mp3search         search (and optionally copy mp3s&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>M</name></author>
	</entry>
</feed>