<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>The Linux Daily</title>
	
	<link>http://www.thelinuxdaily.com</link>
	<description>Tutorials, Guides, Tips, and Tricks from Everyday Experiences</description>
	<lastBuildDate>Wed, 21 Mar 2012 13:00:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TheLinuxDaily" /><feedburner:info uri="thelinuxdaily" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>TheLinuxDaily</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Convert PDF to SWF with pdf2swf</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/Eltr7ym3LCk/</link>
		<comments>http://www.thelinuxdaily.com/2012/03/convert-pdf-to-swf-with-pdf2swf/#comments</comments>
		<pubDate>Wed, 21 Mar 2012 13:00:58 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=2559</guid>
		<description><![CDATA[I stumbled upon pdf2swf when looking for the best way to embed a PDF into a webpage. It works really well and was easy to compile on my shared hosting account (bluehost.com). I installed using the following steps: Download &#8211; Download version 0.9.1 (visit http://www.swftools.org/download.html for latest) wget http://www.swftools.org/swftools-0.9.1.tar.gz Extract &#8211; Extract the newly downloaded [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled upon <a href="http://www.swftools.org/download.html">pdf2swf</a> when looking for the best way to embed a PDF into a webpage. It works really well and was easy to compile on my shared hosting account (bluehost.com). I installed using the following steps:</p>
<p><strong>Download</strong> &#8211; Download version 0.9.1 (visit http://www.swftools.org/download.html for latest)</p>
<pre>
wget http://www.swftools.org/swftools-0.9.1.tar.gz
</pre>
<p><strong>Extract</strong> &#8211; Extract the newly downloaded files</p>
<pre>
tar xzvf swftools-0.9.1.tar.gz
</pre>
<p><strong>Configure</strong> &#8211; Make sure the environment is setup</p>
<pre>
cd swftools-0.9.1; ./configure
</pre>
<p><strong>Compile</strong> &#8211; Getting source to binaries</p>
<pre>
make config; make
</pre>
<p><strong>Test Run</strong> &#8211; You should get a help menu</p>
<pre>
./src/pdf2swf
</pre>
<p><strong>Install</strong> &#8211; Copy the binaries to proper locations on the system<br />
(You won&#8217;t be able to run this step if you&#8217;re installing on a shared host. If that&#8217;s the case, copy the binaries of interest to ~/bin and add ~/bin to PATH variable)</p>
<pre>
make install
</pre>
<p><strong>Usage</strong> &#8211; Run the program (Run <code><a href="http://www.swftools.org/pdf2swf.html">man pdf2swf</a></code> for more info)</p>
<pre>
pdf2swf myfile.pdf myfile.swf
</pre>
<p>That&#8217;s it! Open the .swf using your browser to see pdf2swf&#8217;s handywork.</p>
<p>As a side note, I ended up ditching the .swf method for embedding my document on <a href="http://derekhildreth.com">my website</a> and going with Google&#8217;s PDF viewer which is done with the following line of HTML:</p>
<pre>
&lt;iframe style=&quot;width: 700px; height: 900px; border: 0px none;&quot; src=&quot;http://docs.google.com/gview?url=http://mydomain.com/path/to/myfile.pdf&amp;amp;embedded=true&quot; width=&quot;320&quot; height=&quot;240&quot;&gt;&lt;/iframe&gt;
</pre>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/Eltr7ym3LCk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2012/03/convert-pdf-to-swf-with-pdf2swf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2012/03/convert-pdf-to-swf-with-pdf2swf/</feedburner:origLink></item>
		<item>
		<title>Script to Calculate Number of Hours from Minutes</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/H1khWeGMBuY/</link>
		<comments>http://www.thelinuxdaily.com/2012/03/script-to-calculate-number-of-hours-from-minutes/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 14:00:45 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=2550</guid>
		<description><![CDATA[The following is a quick script that will convert minutes to hours and minutes as well as total hours in decimal form (1 hour, 30 minutes is 1.5 hours). Simply save the contents of the script below to a file, execute chmod +x filename on that file, and then run it with ./filename. Feel free [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a quick script that will convert minutes to hours and minutes as well as total hours in decimal form (1 hour, 30 minutes is 1.5 hours).  Simply save the contents of the script below to a file, execute <code>chmod +x filename</code> on that file, and then run it with <code>./filename</code>.  Feel free to modify it to fit your needs.</p>
<pre>
#!/bin/sh

minutes=432

hrs=`echo "$minutes / 60" | bc`
min=`echo "$minutes % 60" | bc`
if [ $min -gt 0 ]; then
   if [ $min -le 2 ]; then hours=`echo "$hrs + .0" | bc`; fi
   if [ 3 -le $min -a $min -le 8 ]; then hours=`echo "$hrs + .1" | bc`; fi
   if [ 9 -le $min -a $min -le 14 ]; then hours=`echo "$hrs + .2" | bc`; fi
   if [ 15 -le $min -a $min -le 20 ]; then hours=`echo "$hrs + .3" | bc`; fi
   if [ 21 -le $min -a $min -le 26 ]; then hours=`echo "$hrs + .4" | bc`; fi
   if [ 27 -le $min -a $min -le 32 ]; then hours=`echo "$hrs + .5" | bc`; fi
   if [ 33 -le $min -a $min -le 38 ]; then hours=`echo "$hrs + .6" | bc`; fi
   if [ 39 -le $min -a $min -le 44 ]; then hours=`echo "$hrs + .7" | bc`; fi
   if [ 45 -le $min -a $min -le 50 ]; then hours=`echo "$hrs + .8" | bc`; fi
   if [ 51 -le $min -a $min -le 56 ]; then hours=`echo "$hrs + .9" | bc`; fi
   if [ 57 -le $min -a $min -le 60 ]; then hours=`echo "$hrs + 1.0" | bc`; fi
fi

echo "Minutes Entered: $minutes"
echo "$hrs Hours, $min Minutes ($hours Hours)"
</pre>
<p>Please let us know if you think you have a better solution or have a suggestion by using the commenting system below.</p>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/H1khWeGMBuY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2012/03/script-to-calculate-number-of-hours-from-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2012/03/script-to-calculate-number-of-hours-from-minutes/</feedburner:origLink></item>
		<item>
		<title>Simple Stopwatch Script</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/1Sr12iT1UBc/</link>
		<comments>http://www.thelinuxdaily.com/2012/03/simple-stopwatch-script/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 14:00:32 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[Scripting]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=2543</guid>
		<description><![CDATA[The following is a short and plain shell script that will start a timer when you run the program that counts up. I think you could argue that it&#8217;s not a stopwatch because it doesn&#8217;t support laps, but it&#8217;s close enough for me. You can easy get started by copying the following code block into [...]]]></description>
			<content:encoded><![CDATA[<p>The following is a short and plain shell script that will start a timer when you run the program that counts up.  I think you could argue that it&#8217;s not a stopwatch because it doesn&#8217;t support laps, but it&#8217;s close enough for me.  You can easy get started by copying the following code block into a text editor, saving as <em>stopwatch.sh</em>, running <code>chmod +x stopwatch.sh</code> to make it executable, and finally starting it with <code>./stopwatch.sh</code>.  To stop it, hit Ctrl+c.</p>
<pre>
#!/bin/bash

BEGIN=$(date +%s)

echo Starting Stopwatch...

while true; do
   NOW=$(date +%s)
   let DIFF=$(($NOW - $BEGIN))
   let MINS=$(($DIFF / 60))
   let SECS=$(($DIFF % 60))
   let HOURS=$(($DIFF / 3600))
   let DAYS=$(($DIFF / 86400))

   # \r  is a "carriage return" - returns cursor to start of line
   printf "\r%3d Days, %02d:%02d:%02d" $DAYS $HOURS $MINS $SECS
   sleep 0.25
done
</pre>
<p>The previous script will allow you to track from the time you say &#8220;go&#8221; until you stop it.  It&#8217;s also nice to the real-estate on your terminal and will use backspace to remove the characters printed from before to make room for the new ones.</p>
<p>If you&#8217;re not worried about starting it &#8220;now&#8221; or real estate in the terminal, you could always use uptime and throw it into a while loop like this:</p>
<pre>
#!/bin/sh

while true; do uptime | cut -d' ' -f2; done
</pre>
<p>Both are simple, both have their own advantages and disadvantages.  Choose wisely. <img src='http://www.thelinuxdaily.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>Source: <a href="http://www.unix.com/shell-programming-scripting/42861-how-implement-stopwatch-bash.html">unix.com forums</a></p>
<p>I used the scripts to help me figure out how long it was taking my desktop to lock up so I could troubleshoot it better.  Another use might be to keep track of how much time you&#8217;re spending on the computer vs the amount of time spent skiing!  Have fun either way.</p>
<p><strong>Edit</strong><br />
A subscriber, Jim, came up with a much better stopwatch script than my thrown together example.  Jim sent it via email, but I&#8217;ll post it here for all to see.</p>
<blockquote><p>
It doesn&#8217;t start counting till you press the spacebar, pressing the<br />
spacebar again pauses it counting, until the spacebar is pressed to<br />
continue counting.</p>
<p>Press &#8216;q&#8217; to quit<br />
Press &#8216;r&#8217; to reset to zero
</p></blockquote>
<pre>
#!/bin/bash

# sets stdin to no echo and give a char every tenth of a sec.
stty -echo -icanon time 1 &lt;&amp;0

chkspace () {

  if ! read -t 0 ; then return 1 ; fi    # no char pressed
  read -n 1 ans
  if [ &quot;$ans&quot; = &quot; &quot; ]; then return 0 ; fi
  case &quot;$ans&quot; in
  r|R)  COUNT=0 ; BEGIN=$(date +%s)
        printf &quot;\r%3d Days, %02d:%02d:%02d&quot; 0 0 0 0
        ;;
  q|Q)  stty echo icanon &lt;&amp;0
        echo &quot;&quot;
        exit 0
        ;;
  [1-9]) echo &quot; - $ans&quot; ;;
  esac
  return 1
}

echo &quot;Stopwatch: to start and stop press the SPACEBAR...&quot;

printf &quot;\r%3d Days, %02d:%02d:%02d&quot; 0 0 0 0

COUNT=0
IFS=
while true ; do

  while true; do
    if chkspace ; then break; fi
    sleep 0.1
  done

  BEGIN=$(date +%s)
  while true; do
    NOW=$(date +%s)
    let DIFF=$(($NOW - $BEGIN + $COUNT))

    let MINS=$(($DIFF / 60))
    let SECS=$(($DIFF % 60))
    let HOURS=$(($DIFF / 3600))
    let DAYS=$(($DIFF / 86400))

    # \r  is a &quot;carriage return&quot; - returns cursor to start of line
    printf &quot;\r%3d Days, %02d:%02d:%02d&quot; $DAYS $HOURS $MINS $SECS

    if chkspace ; then break; fi
    sleep 0.1
  done

  COUNT=$DIFF
done
</pre>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/1Sr12iT1UBc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2012/03/simple-stopwatch-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2012/03/simple-stopwatch-script/</feedburner:origLink></item>
		<item>
		<title>Quick Start: Setup VSFTPD FTP Server in Fedora</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/Yx8isI-QYc0/</link>
		<comments>http://www.thelinuxdaily.com/2012/03/quick-start-setup-vsftpd-ftp-server-in-fedora/#comments</comments>
		<pubDate>Mon, 05 Mar 2012 14:00:25 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[Tutorials and Guides]]></category>
		<category><![CDATA[FTP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[VSFTPD]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=1727</guid>
		<description><![CDATA[This is a quick start guide, so let&#8217;s get to it! For more information, see bottom of post&#8230; Note: I dug this one out from my post drafts from April, 2010, so I&#8217;m not sure how relevant the information is now. It looks like enough to get somebody heading in the right direction though, so [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick start guide, so let&#8217;s get to it!  For more information, see bottom of post&#8230;</p>
<p>Note: I dug this one out from my post drafts from April, 2010, so I&#8217;m not sure how relevant the information is now.  It looks like enough to get somebody heading in the right direction though, so I&#8217;m going to post it.  I have a related guide <a href="http://www.thelinuxdaily.com/2010/02/guide-on-tftp-server-setup-in-fedora/">here (Guide on TFTP Server Setup in Fedora)</a>.</p>
<h4>Install</h4>
<pre>
su -c 'yum install -y vsftpd'
</pre>
<h4>Setup</h4>
<pre>
gedit /etc/vsftpd/vsftpd.conf
</pre>
<p>The above steps will get you started with a FTP server in Fedora (may work in other distros such as Ubuntu as well).  It will allow you to immediately start sending files via FTP as a local user.  So, if my username on my FTP server was &#8216;derek&#8217;, I could use</p>
<pre>
ftp &lt;em&gt;ip_address&lt;/em&gt; -user derek&quot;
</pre>
<p>Here&#8217;s an example config file:</p>
<pre>
# Example config file /etc/vsftpd/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
</pre>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/Yx8isI-QYc0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2012/03/quick-start-setup-vsftpd-ftp-server-in-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2012/03/quick-start-setup-vsftpd-ftp-server-in-fedora/</feedburner:origLink></item>
		<item>
		<title>Extract Extension Name from Filename in Bash Shell</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/HDlxyD4LH9s/</link>
		<comments>http://www.thelinuxdaily.com/2012/03/extract-extension-name-from-filename-in-bash-shell/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 14:00:27 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[Scripting]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=1944</guid>
		<description><![CDATA[The following commands will extract the file extension string from a given filename. The only trick to these commands is they will give you the final extension after the last &#8216;.&#8217;. In other words, they will not work for extensionless files and files with two dot extension names (like file.tar.gz or similar). for i in [...]]]></description>
			<content:encoded><![CDATA[<p>The following commands will extract the file extension string from a given filename.  The only trick to these commands is they will give you the final extension after the last &#8216;.&#8217;.  In other words, they will not work for extensionless files and files with two dot extension names (like <em>file.tar.gz</em> or similar).</p>
<pre>
for i in *; do echo $i | sed -e 's/.*[.]\(.*\)/\1/'; done
for i in *; do echo $i | awk -F. '{ print $NF }'; done
</pre>
<p>This command will grab the first dot extension even if there are two (it will return <em>tar</em> for <em>file.tar.gz</em>).</p>
<pre>
for i in *; do echo $i | cut -d'.' -f2; done
</pre>
<p>I&#8217;d love to hear your suggestions in the comments if you have a better, more optimized way of doing this.</p>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/HDlxyD4LH9s" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2012/03/extract-extension-name-from-filename-in-bash-shell/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2012/03/extract-extension-name-from-filename-in-bash-shell/</feedburner:origLink></item>
		<item>
		<title>Adding Individual Files or Folders to an Archive</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/CNOGpODOXhg/</link>
		<comments>http://www.thelinuxdaily.com/2012/02/adding-individual-files-or-folders-to-an-archive/#comments</comments>
		<pubDate>Wed, 29 Feb 2012 14:00:54 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[tar]]></category>
		<category><![CDATA[tarball]]></category>
		<category><![CDATA[xargs]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=2500</guid>
		<description><![CDATA[The following steps will walk you through how to create an archive, or tarball, of specific files. This is handy when you don&#8217;t necessarily want to archive an entire directory, but would rather just have subset of files spread across different directories. Open a terminal and we&#8217;ll begin with this example of grabbing files within [...]]]></description>
			<content:encoded><![CDATA[<p>The following steps will walk you through how to create an archive, or tarball, of specific files.  This is handy when you don&#8217;t necessarily want to archive an entire directory, but would rather just have subset of files spread across different directories.  Open a terminal and we&#8217;ll begin with this example of grabbing files within our home directory ending in .php.</p>
<h3><span style="color: rgb(128, 0, 0);">Step 1: Create a blank/empty tarball in our home directory to add to</span></h3>
<pre>
tar cvf ~/php_backups.tar --files-from /dev/null
</pre>
<h3><span style="color: rgb(128, 0, 0);">Step 2: Add/append folders to tarball</span></h3>
<p>The following will search for all files ending in .php, pipe those results into xargs which feeds into the tar command to add to our directory.</p>
<pre>
find ~/ -type f -name "*.php" | xargs tar rvf ~/php_backups.tar
</pre>
<h3><span style="color: rgb(128, 0, 0);">Step 3: Compress the archive</span></h3>
<pre>
gzip ~/php_backups.tar
</pre>
<h3><span style="color: rgb(128, 0, 0);">Step 4: # Take a look at the archive to verify the directory structure</span></h3>
<pre>
tar tzvf backup.tar.gz
</pre>
<p>From here, you can untar the file to whatever directory you want.  Keep in mind that it will overwrite any existing files.  You can combine other commands (like <code>for</code> or <code>ls</code>) to get a list of files that you&#8217;re interested in.  You could also save all of the files with the directory path into a file and use <code>cat</code> to pipe into the <code>xargs</code> command.</p>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/CNOGpODOXhg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2012/02/adding-individual-files-or-folders-to-an-archive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2012/02/adding-individual-files-or-folders-to-an-archive/</feedburner:origLink></item>
		<item>
		<title>Proper authorized_keys Permissions for Passwordless SSH Access</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/qSSuGjxTx1g/</link>
		<comments>http://www.thelinuxdaily.com/2012/02/proper-authorized_keys-permissions-for-passwordless-ssh-access/#comments</comments>
		<pubDate>Mon, 27 Feb 2012 14:00:46 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=2519</guid>
		<description><![CDATA[I recently used the guide over at http://linuxproblem.org to setup passwordless SSH access between hosts (direct link), but for some reason, I was still being prompted to enter a password. I spent a while studying the verbose messages from ssh -vv without any resolution. I returned to the guide and saw a small note about [...]]]></description>
			<content:encoded><![CDATA[<p>I recently used the guide over at <a href="http://linuxproblem.org">http://linuxproblem.org</a> to setup passwordless SSH access between hosts (<a href="http://linuxproblem.org/art_9.html">direct link</a>), but for some reason, I was still being prompted to enter a password.  I spent a while studying the verbose messages from <code>ssh -vv</code> without any resolution.  I returned to the guide and saw a small note about permissions on the bottom of the page.  I ran through the instruction there as well, but with no resolve.  I finally came across the <a href="http://www.openssh.org/faq.html#3.14">OpenSSH FAQ page</a> which thankfully explained one or more permission settings I was missing.  If you find yourself in my same shoes, try running the following commands on the remote host you&#8217;re trying to connect to:</p>
<pre>
chmod 700 $HOME/.ssh
chmod go-w $HOME $HOME/.ssh
chmod 600 $HOME/.ssh/authorized_keys
chown `whoami` $HOME/.ssh/authorized_keys
</pre>
<p>This is what got things to work for me after fighting with it for a while.  I hope it helps somebody else out there too.  Also, if there&#8217;s any room for improvement, let me know.  I wasn&#8217;t looking for an optimized solution at the time because I was tired of fighting.</p>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/qSSuGjxTx1g" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2012/02/proper-authorized_keys-permissions-for-passwordless-ssh-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2012/02/proper-authorized_keys-permissions-for-passwordless-ssh-access/</feedburner:origLink></item>
		<item>
		<title>Reinstalled WordPress</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/K46wYk27xRM/</link>
		<comments>http://www.thelinuxdaily.com/2011/12/reinstalled-wordpress/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 22:50:59 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.derekhildreth.com/tld/?p=2506</guid>
		<description><![CDATA[After many failed attempts at removing some bad code somewhere in one of my wordpress blogs, I decided to delete the entire wordpress installation and start with a fresh one. This time I&#8217;m using some security themed plugins and being much more selective on the themes that I include. Please bear with me as I [...]]]></description>
			<content:encoded><![CDATA[<p>After many failed attempts at removing some bad code somewhere in one of my wordpress blogs, I decided to delete the entire wordpress installation and start with a fresh one.  This time I&#8217;m using some security themed plugins and being much more selective on the themes that I include.  <del datetime="2011-12-11T02:05:30+00:00">Please bear with me as I try to get the site back to its original state.<br />
</del><br />
We should be pretty much good to go now.  I&#8217;m confident things will be smoother from here on out.  By the way, if any of you have any suggestions for beefing up security on a wordpress blog, please let me know in the comments!</p>
<p>Best Regards,<br />
Derek</p>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/K46wYk27xRM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2011/12/reinstalled-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2011/12/reinstalled-wordpress/</feedburner:origLink></item>
		<item>
		<title>Site Downtime</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/wn83M-wI71c/</link>
		<comments>http://www.thelinuxdaily.com/2011/11/site-downtime/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 06:39:04 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=2502</guid>
		<description><![CDATA[There was a major hardware failure at the hosting facilities over Thanksgiving weekend which took down (and wiped clean) everything on this site. Luckily, the staff were able to salvage the hard drive from the old server and transfer everything to the new hardware. This does take some time to transfer. We&#8217;re hoping that by [...]]]></description>
			<content:encoded><![CDATA[<p>There was a major hardware failure at the hosting facilities over Thanksgiving weekend which took down (and wiped clean) everything on this site.  Luckily, the staff were able to salvage the hard drive from the old server and transfer everything to the new hardware.  This does take some time to transfer.  We&#8217;re hoping that by tomorrow, things will be fully transferred and back to normal.  In the meantime, please forgive any oddities or speed issues as you browse.  They should be cleared up soon.  If you do find something that you need immediately, please feel free to use the comment form below.</p>
<p>Best Regards,<br />
Derek  </p>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/wn83M-wI71c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2011/11/site-downtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2011/11/site-downtime/</feedburner:origLink></item>
		<item>
		<title>Happy Thanksgiving!</title>
		<link>http://feedproxy.google.com/~r/TheLinuxDaily/~3/XTcL4EeI7tU/</link>
		<comments>http://www.thelinuxdaily.com/2011/11/happy-thanksgiving/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 14:00:26 +0000</pubDate>
		<dc:creator>Derek@TheDailyLinux</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[thanksgiving]]></category>

		<guid isPermaLink="false">http://www.thelinuxdaily.com/?p=2494</guid>
		<description />
			<content:encoded><![CDATA[<p><center><a href="http://www.thelinuxdaily.com/wp-content/uploads/2011/11/tux_thanksgiving.gif"><img src="http://www.thelinuxdaily.com/wp-content/uploads/2011/11/tux_thanksgiving.gif" alt="" title="tux_thanksgiving" width="347" height="208" class="aligncenter size-full wp-image-2495" /></a></center></p>
<img src="http://feeds.feedburner.com/~r/TheLinuxDaily/~4/XTcL4EeI7tU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.thelinuxdaily.com/2011/11/happy-thanksgiving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.thelinuxdaily.com/2011/11/happy-thanksgiving/</feedburner:origLink></item>
	</channel>
</rss>

