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

<channel>
	<title>Tips and Tricks</title>
	<atom:link href="/blog/feed/" rel="self" type="application/rss+xml" />
	<link>https://legend.ws/blog</link>
	<description>Random tech ramblings</description>
	<lastBuildDate>Tue, 16 Apr 2013 17:02:23 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Mass changing files&#8217; modification date on Windows</title>
		<link>https://legend.ws/blog/tips-tricks/mass-changing-files-modification-date-on-windows/</link>
		<comments>https://legend.ws/blog/tips-tricks/mass-changing-files-modification-date-on-windows/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 14:41:01 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=248</guid>
		<description><![CDATA[<p>It&#8217;s sometimes useful to be able to change a file&#8217;s modification date. Linux makes it easy by simply using the &#8220;touch&#8221; command. I found this rather useful in cases where files were transferred between servers, which unfortunately do not have their times synchronized.</p>
<p>So, how can this be done on Windows?</p>
<p>Here is the command to issue in order to modify a single file&#8217;s modification time:</p>
<p>copy filename,,+</p>
<p>But in most cases, you&#8217;d be looking at mass-changing the modification date of files inside a certain directory. To do so, use the following command:</p>
<p>for %f in (c:\path\to\folder\*.*) do copy %f,,+&#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/mass-changing-files-modification-date-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Highlighting &#8220;grep&#8221; matches</title>
		<link>https://legend.ws/blog/tips-tricks/highlighting-grep-matches/</link>
		<comments>https://legend.ws/blog/tips-tricks/highlighting-grep-matches/#comments</comments>
		<pubDate>Tue, 21 Feb 2012 15:14:15 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=257</guid>
		<description><![CDATA[<p>&#8220;grep&#8221; is a useful Linux tool allowing the user to print lines matching a specific search pattern. Most popular uses is by &#8220;piping&#8221; the output of one command to &#8220;grep&#8221; (such as cat /path/to/file &#124; grep findme), or by directly looking for a pattern inside one or more file (e.g. grep findme /path/to/*.txt).</p>
<p>This would print lines that match the search string / expression. However, how to colorize the matching patterns? Simple! Use the &#45;&#45;color=always flag, i.e.:</p>
<p>grep &#45;&#45;color=always &#45;i findme /path/to/*.txt</p>
<p>Next, if you&#8217;re doing lots of &#8220;grep&#8221; work and don&#8217;t want to keep specifying the color flag, you &#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/highlighting-grep-matches/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Determining, via the shell prompt, the Linux distribution in use</title>
		<link>https://legend.ws/blog/tips-tricks/determining-via-the-shell-prompt-the-linux-distribution-in-use/</link>
		<comments>https://legend.ws/blog/tips-tricks/determining-via-the-shell-prompt-the-linux-distribution-in-use/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 11:55:35 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=252</guid>
		<description><![CDATA[<p>SSH is sometimes the only mode of access you have to a server. So how do you instantly determine the distro in use?</p>
<p>The following would work for most popular distributions (RedHat, CentOS, Ubuntu, etc.):</p>
<p>cat /etc/*-release</p>
<p>If the above returns &#8220;No such file or directory&#8221;, try the following which would work on Debian-based distros:</p>
<p>lsb_release -a</p>
<p>Finally, for kernel-related data, use the following command:</p>
<p>uname -a</p>
<p>You&#8217;ll be able to determine the kernel version and release date, whether it&#8217;s a 32 or 64 bit hardware and the current machine hostname.&#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/determining-via-the-shell-prompt-the-linux-distribution-in-use/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flushing / clearing DNS in Mac OSX</title>
		<link>https://legend.ws/blog/tips-tricks/flushing-dns-on-mac/</link>
		<comments>https://legend.ws/blog/tips-tricks/flushing-dns-on-mac/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 18:08:16 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=239</guid>
		<description><![CDATA[<p>Below is how to clear / flush the DNS cache in Mac OSX.</p>
<p>(1) Open the terminal (Finder -&#62; Applications -&#62; Utilities -&#62; Terminal)</p>
<p>(2a) In case your operating system is &#8216;Leopard&#8217; (10.5.*) or &#8216;Snow Leopard&#8217; (10.6.*), issue the following command:</p>
<p>dscacheutil -flushcache</p>
<p>(2b) Otherwise, for older operating systems, issue the following command:</p>
<p>lookupd -flushcache</p>
<p>This is the equivalent of the following Windows command: ipconfig /flushdns&#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/flushing-dns-on-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Deleting a file, the name of which starts with a hyphen (Linux)</title>
		<link>https://legend.ws/blog/tips-tricks/deleting-a-file-starting-with-a-hyphen-on-linux/</link>
		<comments>https://legend.ws/blog/tips-tricks/deleting-a-file-starting-with-a-hyphen-on-linux/#comments</comments>
		<pubDate>Mon, 02 May 2011 10:08:27 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=147</guid>
		<description><![CDATA[<p><a href="/blog/wp-content/uploads/2011/05/shell.png"></a><a href="/blog/wp-content/uploads/2011/05/rm.png"></a>You might have come across a difficulty in deleting a file in Linux whose name starts with a dash/hyphen.</p>
<p>Adding an escape character (e.g. rm -rf \-filename) or quoting the file name (e.g. rm -rf &#8220;-filename&#8221;) will not do the job.</p>
<p>The solution is simple: explicitly provide the full or relative path to the file. e.g.:</p>
<p>rm -rf /path/to/-file</p>
<p>or the following &#8211; if for instance your current working directory is the one containing the file in question</p>
<p>rm -rf ./-file&#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/deleting-a-file-starting-with-a-hyphen-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac users: turn colors into negative</title>
		<link>https://legend.ws/blog/tips-tricks/mac-users-turn-colors-into-negative/</link>
		<comments>https://legend.ws/blog/tips-tricks/mac-users-turn-colors-into-negative/#comments</comments>
		<pubDate>Thu, 24 Mar 2011 23:13:16 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=141</guid>
		<description><![CDATA[<p>Are you a mac user? try the following keyboard combination:</p>
<p>cmd + alt (option) + ctrl + 8</p>
<p>Colors are instantly inverted, giving the entire screen a negative-photography like feel.</p>
<p>Hit the same combination to restore the colors.&#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/mac-users-turn-colors-into-negative/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: finding files modified or accessed at a certain time</title>
		<link>https://legend.ws/blog/tips-tricks/linux-finding-files-modified-or-accessed-at-a-certain-time/</link>
		<comments>https://legend.ws/blog/tips-tricks/linux-finding-files-modified-or-accessed-at-a-certain-time/#comments</comments>
		<pubDate>Sun, 20 Feb 2011 19:10:11 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=136</guid>
		<description><![CDATA[<p>The &#8216;find&#8217; utility is quite handy when used with the proper parameters. Below is a few ways to find files/folders based on the time they were accessed or modified.</p>
<p><strong>Example 1</strong>:</p>
<p>find /path/to/folder -type f -name &#8220;*.txt&#8221; -mtime -5</p>
<p>This will find &#8216;files&#8217; (-type f) within the folder /path/to/folder (or one of its sub directories), whose name ends with &#8216;.txt&#8217;, and which were <span style="text-decoration: underline;">modified</span> (<span style="text-decoration: underline;">m</span>time) <strong>less than 5 days ago</strong></p>
<p><strong>Example 2:</strong></p>
<p>find /path/to/folder -type d -name &#8220;stat*&#8221; -mtime +10</p>
<p>This would find &#8216;directories&#8217; (-type d) within the folder /path/to/folder (or one of its subdirectories), whose name &#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/linux-finding-files-modified-or-accessed-at-a-certain-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook&#8217;s new photo viewer</title>
		<link>https://legend.ws/blog/tips-tricks/facebooks-new-photo-viewer/</link>
		<comments>https://legend.ws/blog/tips-tricks/facebooks-new-photo-viewer/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 22:25:45 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=132</guid>
		<description><![CDATA[<p>Facebook recently introduced a new way of browsing photos and albums. The new photo viewer uses the lightbox technique whereby the page is dimmed and a box is overlaid with a larger version of the selected image.</p>
<p>Some of the improvements it brings are the ability to stay on the page without having to go back in your browser&#8217;s history (you simply hit the close &#8216;x&#8217; button and you&#8217;re back to where you were), faster photo flipping/browsing and the ability to download a high res version of the image (if available).</p>
<p>For those who hate this lightbox preview, you may &#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/facebooks-new-photo-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Forcing links that open in a &#8216;new window&#8217; to open in a &#8216;new tab&#8217;</title>
		<link>https://legend.ws/blog/tips-tricks/forcing-links-that-open-in-a-new-window-to-open-in-a-new-tab/</link>
		<comments>https://legend.ws/blog/tips-tricks/forcing-links-that-open-in-a-new-window-to-open-in-a-new-tab/#comments</comments>
		<pubDate>Sat, 07 Aug 2010 12:59:32 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=116</guid>
		<description><![CDATA[<p>Do you want to force links that open in a new window to open in a new tab instead? The answer is pretty simple.</p>
<p><strong>Firefox</strong></p>
<ul>
<li>Type the following in the url bar: <em>about:config</em></li>
<li>Edit the following variables:
<ul>
<li>browser.link.open_external -&#62; 3</li>
<li>browser.link.open_newwindow -&#62; 3</li>
<li>browser.link.open_newwindow.restriction -&#62; 0</li>
</ul>
</li>
<li>If any of those variables is not yet defined, simply right click and select &#8216;new-&#62;integer&#8217;, enter the variable name then its integer value.</li>
</ul>
<p><strong>IE8</strong></p>
<p>Simply:</p>
<ul>
<li>Go to: tools -&#62; internet options</li>
<li>Then make sure you select &#8216;<em>always open pop-ups in a new tab</em>&#8216; under &#8216;<em>when a pop-up is encountered</em>&#8216;</li>
</ul>
<p>That&#8217;s &#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/forcing-links-that-open-in-a-new-window-to-open-in-a-new-tab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enabling telnet in windows vista</title>
		<link>https://legend.ws/blog/tips-tricks/enabling-telnet-in-windows-vista/</link>
		<comments>https://legend.ws/blog/tips-tricks/enabling-telnet-in-windows-vista/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 08:59:14 +0000</pubDate>
		<dc:creator><![CDATA[admin]]></dc:creator>
		
		<guid isPermaLink="false">https://legend.ws/blog/?p=113</guid>
		<description><![CDATA[<p>Some of you may be missing the good old command-line telnet client. The thing is that vista has this client disabled by default. The good news is that you can easily install/enable it. To do so, follow these steps:</p>
<ol>
<li>Go to Control Panel</li>
<li>Click on &#8216;Programs&#8217;</li>
<li>Under &#8216;Programs and Features&#8217;, click on &#8216;Turn windows features on or off&#8217;</li>
<li>Wait a bit for the list to be compiled</li>
<li>Tick &#8216;Telnet <strong>client</strong>&#8216; and hit &#8216;OK&#8217; then wait for it to be installed</li>
</ol>
<p>You may now open a command prompt and use <em>telnet hostname port</em></p>
<p>Good luck&#8230;</p>]]></description>
		<wfw:commentRss>https://legend.ws/blog/tips-tricks/enabling-telnet-in-windows-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
