<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>don't feed the seagulls &#187; shell commands</title>
	<atom:link href="http://dontfeedtheseagulls.com/category/shell-commands/feed/" rel="self" type="application/rss+xml" />
	<link>http://dontfeedtheseagulls.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 15 Feb 2011 03:21:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Using awk to add new files to svn</title>
		<link>http://dontfeedtheseagulls.com/2009/07/17/using-awk-to-add-new-files-to-svn/</link>
		<comments>http://dontfeedtheseagulls.com/2009/07/17/using-awk-to-add-new-files-to-svn/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 20:02:52 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[awk]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=56</guid>
		<description><![CDATA[svn add `svn status &#124; grep "^?" &#124; awk '{print $2 }'` you can also use grep -v to exclude specific files svn add `svn status &#124; grep "^?" &#124; awk '{print $2 }' &#124; grep -v prefs.inc.php`]]></description>
			<content:encoded><![CDATA[<pre>svn add `svn status | grep "^?" | awk '{print $2 }'`</pre>
<p>you can also use grep -v to exclude specific files</p>
<pre>svn add `svn status | grep "^?" | awk '{print $2 }' | grep -v prefs.inc.php`</pre>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/07/17/using-awk-to-add-new-files-to-svn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursively convert all text files in a directory from Windows EOL to Unix with dos2unix</title>
		<link>http://dontfeedtheseagulls.com/2009/04/10/recursively-convert-all-text-files-in-a-directory-from-windows-eol-to-unix-with-dos2unix/</link>
		<comments>http://dontfeedtheseagulls.com/2009/04/10/recursively-convert-all-text-files-in-a-directory-from-windows-eol-to-unix-with-dos2unix/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 21:36:41 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[dos2unix]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=47</guid>
		<description><![CDATA[find . -type f -exec dos2unix {} \;]]></description>
			<content:encoded><![CDATA[<blockquote><pre>find . -type f -exec dos2unix {} \;</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/04/10/recursively-convert-all-text-files-in-a-directory-from-windows-eol-to-unix-with-dos2unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating a RedHat users file to FreeBSD/OpenBSD</title>
		<link>http://dontfeedtheseagulls.com/2009/04/05/migrating-a-redhat-users-file-to-freebsdopenbsd/</link>
		<comments>http://dontfeedtheseagulls.com/2009/04/05/migrating-a-redhat-users-file-to-freebsdopenbsd/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 04:33:20 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=34</guid>
		<description><![CDATA[http://www.openbsd.org/faq/faq9.html#passwd First, figure out if your Linux password file is shadowed or not. If it is, install John the Ripper from packages or ports (security/john) and use the unshadow utility that comes with it to merge your passwd and shadow files into one Sixth Edition-style file. Using your Linux password file, we&#8217;ll call it linux_passwd, [...]]]></description>
			<content:encoded><![CDATA[<p>http://www.openbsd.org/faq/faq9.html#passwd</p>
<p>First, figure out if your Linux password file is shadowed or not.  If it is, install <a href="http://www.openwall.com/john/">John the Ripper</a> from <a href="http://www.openbsd.org/faq/faq15.html">packages or ports</a> (<tt>security/john</tt>) and use the unshadow utility that comes with it to merge your <tt>passwd</tt> and <tt>shadow</tt> files into one Sixth Edition-style file.</p>
<p>Using your Linux password file, we&#8217;ll call it <tt>linux_passwd</tt>, you need to add in ::0:0 between fields four and seven. <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=awk&amp;sektion=1">awk(1)</a> does this for you.</p>
<blockquote>
<pre># <strong>cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", \</strong>
&gt; <strong>$1,$2,$3,$4,$5,$6,$7); }' &gt; new_passwd</strong></pre>
</blockquote>
<p>At this point, you want to edit the <tt>new_passwd</tt> file and remove the root and other system entries that are already present in your OpenBSD password file or aren&#8217;t applicable with OpenBSD (all of them). Also, make sure there are no duplicate usernames or user IDs between <tt>new_passwd</tt> and your OpenBSD box&#8217;s <tt>/etc/passwd</tt>.  The easiest way to do this is to start with a fresh <tt>/etc/passwd</tt></p>
<p>.</p>
<blockquote>
<pre># <strong>cat new_passwd &gt;&gt; /etc/master.passwd</strong>
# <strong>pwd_mkdb -p /etc/master.passwd</strong></pre>
</blockquote>
<p>The last step, <tt>pwd_mkdb</tt> is necessary to rebuild the /etc/spwd.db and /etc/pwd.db files.  It also creates a Sixth Edition-style password file (minus encrypted passwords) at /etc/passwd for programs which use it.  OpenBSD uses a stronger encryption for passwords, blowfish, which is very unlikely to be found on any system which uses full Sixth Edition-style password files.  To switch over to this stronger encryption, simply have the users run &#8216;passwd&#8217; and change their password.  The new password they enter will be encrypted with your default setting (usually blowfish unless you&#8217;ve edited /etc/login.conf).  Or, as <em>root</em>, you can run <tt>passwd <em>username</em></tt>.</p>
<p>Also you will want to copy over the groups file. note again, only copy over groups that do not exist in both.</p>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/04/05/migrating-a-redhat-users-file-to-freebsdopenbsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>convert linux passwd to a FreeBSD one</title>
		<link>http://dontfeedtheseagulls.com/2009/03/31/convert-linux-passwd-to-a-freebsd-one/</link>
		<comments>http://dontfeedtheseagulls.com/2009/03/31/convert-linux-passwd-to-a-freebsd-one/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 20:47:36 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/?p=32</guid>
		<description><![CDATA[cat linux_passwd &#124; awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", $1,$2,$3,$4,$5,$6,$7); }' &#62; new_passwd]]></description>
			<content:encoded><![CDATA[<pre>cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", $1,$2,$3,$4,$5,$6,$7); }' &gt; new_passwd</pre>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2009/03/31/convert-linux-passwd-to-a-freebsd-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make a recursive diff file</title>
		<link>http://dontfeedtheseagulls.com/2007/11/06/make-a-recursive-diff-file/</link>
		<comments>http://dontfeedtheseagulls.com/2007/11/06/make-a-recursive-diff-file/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 17:17:26 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[diff]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/2007/11/06/make-a-recursive-diff-file/</guid>
		<description><![CDATA[diff -exclude="*~" -Naur &#60;old_path&#62; &#60;new_path&#62;]]></description>
			<content:encoded><![CDATA[<pre>diff -exclude="*~" -Naur &lt;old_path&gt; &lt;new_path&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2007/11/06/make-a-recursive-diff-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SquirrelMail SVN command</title>
		<link>http://dontfeedtheseagulls.com/2007/11/06/squirrelmail-svn-command/</link>
		<comments>http://dontfeedtheseagulls.com/2007/11/06/squirrelmail-svn-command/#comments</comments>
		<pubDate>Tue, 06 Nov 2007 17:12:41 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[shell commands]]></category>
		<category><![CDATA[SquirrelMail]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/2007/11/06/squirrelmail-svn-command/</guid>
		<description><![CDATA[svn co https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail/branches/SM-1_4-STABLE/squirrelmail squirrelmail]]></description>
			<content:encoded><![CDATA[<pre>svn co https://squirrelmail.svn.sourceforge.net/svnroot/squirrelmail/branches/SM-1_4-STABLE/squirrelmail squirrelmail</pre>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2007/11/06/squirrelmail-svn-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using rsync over ssh simple command</title>
		<link>http://dontfeedtheseagulls.com/2007/10/31/using-rsync-over-ssh-simple-command/</link>
		<comments>http://dontfeedtheseagulls.com/2007/10/31/using-rsync-over-ssh-simple-command/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 12:58:32 +0000</pubDate>
		<dc:creator>tstauffe</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell commands]]></category>

		<guid isPermaLink="false">http://dontfeedtheseagulls.com/2007/10/31/using-rsync-over-ssh-simple-command/</guid>
		<description><![CDATA[rsync -avz --exclude "*bak" --exclude "*~" -e ssh remoteuser@remotehost:/remote/dir /this/dir/ arguments used: -a, &#8211;archive This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). The only exception to the above equivalence is when &#8211;files-from is specified, in which [...]]]></description>
			<content:encoded><![CDATA[<pre>rsync -avz <a name="rsync"></a>--exclude "*bak" --exclude "*~" -e ssh remoteuser@remotehost:/remote/dir /this/dir/</pre>
<p>arguments used:</p>
<blockquote><p>-a, &#8211;archive<br />
This is equivalent to -rlptgoD. It is a quick way of saying you want recursion and want to preserve almost everything (with -H being a notable omission). The only exception to the above equivalence is when &#8211;files-from is specified, in which case -r is not implied.<br />
-v, &#8211;verbose<br />
This option increases the amount of information you are given during the transfer. By default, rsync works silently. A single -v will give you information about what files are being transferred and a brief summary at the end. Two -v flags will give you information on what files are being skipped and slightly more information at the end. More than two -v flags should only be used if you are debugging rsync.<br />
Note that the names of the transferred files that are output are done using a default &#8211;out-format of &#8220;%n%L&#8221;, which tells you just the name of the file and, if the item is a link, where it points. At the single -v level of verbosity, this does not mention when a file gets its attributes changed. If you ask for an itemized list of changed attributes (either &#8211;itemize-changes or adding &#8220;%i&#8221; to the &#8211;out-format setting), the output (on the client) increases to mention all items that are changed in any way. See the &#8211;out-format option for more details.<br />
-z, &#8211;compress<br />
With this option, rsync compresses the file data as it is sent to the destination machine, which reduces the amount of data being transmitted &#8212; something that is useful over a slow connection.<br />
Note that this option typically achieves better compression ratios than can be achieved by using a compressing remote shell or a compressing transport because it takes advantage of the implicit information in the matching data blocks that are not explicitly sent over the connection.<br />
Note that -a does not preserve hardlinks, because finding multiply-linked files is expensive. You must separately specify -H.<br />
-e, &#8211;rsh=COMMAND<br />
This option allows you to choose an alternative remote shell program to use for communication between the local and remote copies of rsync. Typically, rsync is configured to use ssh by default, but you may prefer to use rsh on a local network.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://dontfeedtheseagulls.com/2007/10/31/using-rsync-over-ssh-simple-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

