\<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dfwlpiki.dfwlp.com/index.php?action=history&amp;feed=atom&amp;title=Useful_Linux_Commands</id>
	<title>Useful Linux Commands - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dfwlpiki.dfwlp.com/index.php?action=history&amp;feed=atom&amp;title=Useful_Linux_Commands"/>
	<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;action=history"/>
	<updated>2026-05-25T18:02:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;diff=248&amp;oldid=prev</id>
		<title>Jhorne: /* Useful ways to use Sed in Linux */</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;diff=248&amp;oldid=prev"/>
		<updated>2022-05-06T19:34:03Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Useful ways to use Sed in Linux&lt;/span&gt;&lt;/span&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 19:34, 6 May 2022&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-l18&quot;&gt;Line 18:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 18:&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;To uncomment something in a config file:&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;To uncomment something in a config file:&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;  sed -i 's/^#compress/compress/' /etc/logrotate.conf&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;  sed -i 's/^#compress/compress/' /etc/logrotate.conf&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; sed -i 's/^#UseDNS no/UseDNS no/' /etc/ssh/sshd_config&lt;/ins&gt;&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;To remove &amp;quot;rhgb quiet&amp;quot; from grub.conf:&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;To remove &amp;quot;rhgb quiet&amp;quot; from grub.conf:&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;  sed -i 's/rhgb quiet//g' /boot/grub/grub.conf&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;  sed -i 's/rhgb quiet//g' /boot/grub/grub.conf&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key dfwlpiki:diff::1.12:old-205:rev-248 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jhorne</name></author>
	</entry>
	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;diff=205&amp;oldid=prev</id>
		<title>Jhorne at 13:29, 28 July 2020</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;diff=205&amp;oldid=prev"/>
		<updated>2020-07-28T13:29:29Z</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 13:29, 28 July 2020&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;[[Category:Linux]]&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;[[Category:Linux]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Measure disk i/o performance==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; dd if=/dev/zero of=outfile bs=1M count=1024 conv=fdatasync; rm -rf outfile&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; dd if=/dev/zero of=outfile bs=1M count=2048 conv=fdatasync; rm -rf outfile&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; dd if=/dev/zero of=outfile bs=1M count=4096 conv=fdatasync; rm -rf outfile&lt;/ins&gt;&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;br/&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;br/&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;==Refresh disk storage system after adding new disks==&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;==Refresh disk storage system after adding new disks==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key dfwlpiki:diff::1.12:old-86:rev-205 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jhorne</name></author>
	</entry>
	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;diff=86&amp;oldid=prev</id>
		<title>Jhorne at 02:15, 20 August 2017</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;diff=86&amp;oldid=prev"/>
		<updated>2017-08-20T02:15:34Z</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 02:15, 20 August 2017&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;[[Category:Linux]]&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;[[Category:Linux]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Refresh disk storage system after adding new disks==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; for i in `ls /sys/class/scsi_host`; do echo &quot;- - -&quot; &gt; /sys/class/scsi_host/${i}/scan; done&lt;/ins&gt;&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;br/&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;br/&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;==Useful Random Bash Command Line Usages==&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;==Useful Random Bash Command Line Usages==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key dfwlpiki:diff::1.12:old-24:rev-86 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jhorne</name></author>
	</entry>
	<entry>
		<id>https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;diff=24&amp;oldid=prev</id>
		<title>Jhorne: Created page with &quot;Category:Linux  ==Useful Random Bash Command Line Usages== To find all matching files names in a directory hierarchy  find /path/to/dir -type f | rev | sort | sed -nr ':a...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dfwlpiki.dfwlp.com/index.php?title=Useful_Linux_Commands&amp;diff=24&amp;oldid=prev"/>
		<updated>2016-12-29T16:39:49Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;&lt;a href=&quot;/index.php?title=Category:Linux&quot; title=&quot;Category:Linux&quot;&gt;Category:Linux&lt;/a&gt;  ==Useful Random Bash Command Line Usages== To find all matching files names in a directory hierarchy  find /path/to/dir -type f | rev | sort | sed -nr &amp;#039;:a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:Linux]]&lt;br /&gt;
&lt;br /&gt;
==Useful Random Bash Command Line Usages==&lt;br /&gt;
To find all matching files names in a directory hierarchy&lt;br /&gt;
 find /path/to/dir -type f | rev | sort | sed -nr ':a N;/^([^/]*\/).*\n\1/p;D;ba' | uniq | rev&lt;br /&gt;
&lt;br /&gt;
==Useful ways to use Sed in Linux==&lt;br /&gt;
These first two examples are used in linux installation scripts as %post activities.&lt;br /&gt;
&lt;br /&gt;
To uncomment something in a config file:&lt;br /&gt;
 sed -i 's/^#compress/compress/' /etc/logrotate.conf&lt;br /&gt;
To remove &amp;quot;rhgb quiet&amp;quot; from grub.conf:&lt;br /&gt;
 sed -i 's/rhgb quiet//g' /boot/grub/grub.conf&lt;br /&gt;
&lt;br /&gt;
Examples from various task scripts which i will categeorize and label later: (some will be repeats)&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[root@d0lppb021 syssupport]# grep sed *.sh&lt;br /&gt;
addjhorne.sh:sed -i '/^jhorne/ c\jhorne:yaaaaaaaaaaaaaaaaaaaaaaaaaaaayyyyyyyyyyyyyyyyyyyyyy:0:99999:7:::' /etc/shadow&lt;br /&gt;
filesystem_lv_mysql-vg01-500G-sda.sh:sed -i '/lv_mysql/d' /etc/fstab&lt;br /&gt;
filesystem_lv_postgres-vg01-500G-sda.sh:sed -i '/lv_postgres/d' /etc/fstab&lt;br /&gt;
fixbacula.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
fixpostfix.sh:sed -i &amp;quot;s/^#myhostname = virtual.domain.tld/myhostname = $HOSTNAME.skopos.me/g&amp;quot; /etc/postfix/main.cf&lt;br /&gt;
fixpostfix.sh:sed -i 's/^#mydomain = domain.tld/mydomain = skopos.us/' /etc/postfix/main.cf&lt;br /&gt;
fixpostfix.sh:sed -i 's/^#myorigin = $mydomain/myorigin = $mydomain/' /etc/postfix/main.cf&lt;br /&gt;
initialovirt.sh:sed -i 's/Santiago//g' /etc/redhat-release&lt;br /&gt;
initialovirt.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
initialphysical.sh:sed -i 's/Santiago//g' /etc/redhat-release&lt;br /&gt;
initialphysical.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
initialpxe.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
initialvirtual.sh:sed -i &amp;quot;s/set-hostname/$HOSTNAME/g&amp;quot; /etc/bacula/bacula-fd.conf&lt;br /&gt;
readyesno.sh:        [Yy]* ) umount /opt/mysql; pvcreate /dev/sda1; vgcreate vg01 /dev/sda1; lvcreate -L 500G -n lv_mysql vg01; mkfs.ext4 /dev/vg01/lv_mysql; sed -i '/lv_mysql/d' /etc/fstab; echo &amp;quot;/dev/mapper/vg01-lv_mysql /opt/mysql              ext4    defaults,_netdev 0 0&amp;quot; &amp;gt;&amp;gt; /etc/fstab; cat /etc/fstab; mount -a; df -h; break;;&lt;br /&gt;
setupssl.sh:sed -i &amp;quot;s/localhost.crt/skopos.me.crt/g&amp;quot; /etc/httpd/conf.d/ssl.conf&lt;br /&gt;
setupssl.sh:sed -i &amp;quot;s/localhost.key/skopos.me.key/g&amp;quot; /etc/httpd/conf.d/ssl.conf&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example is from to change a PXE profile file, to add ksdevice parameter:&lt;br /&gt;
 sed -i 's/^    append initrd/    append ksdevice=em1 nicdelay=50 linksleep=50 initrd/' /tftpboot/linux-install/pxelinux.cfg/0*&lt;br /&gt;
&lt;br /&gt;
==Yum Configuration to Skip a Package==&lt;br /&gt;
I have had a problem with Fedora overwriting the respository version of Cacti with the source version that I had previously installed.  To prevent yum from updating a specific package, I have found this switch:&lt;br /&gt;
 yum -y update --exclude=cacti&lt;br /&gt;
There is also a facility to handle this directly, from within /etc/yum/yum.conf.&lt;/div&gt;</summary>
		<author><name>Jhorne</name></author>
	</entry>
</feed>