<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/1.5.2" -->
<rss version="0.92">
<channel>
	<title>*nix tips</title>
	<link>http://zort.org/tips.zunix.org</link>
	<description>Tips that I collected &#038; invented.</description>
	<lastBuildDate>Thu, 03 Dec 2009 08:30:26 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>

	<item>
		<title>How to remove trailing ^M (carriage return)  from within VI?</title>
		<description>	
:%s/^M//g

	or
	
:set ff=unix


 </description>
		<link>http://zort.org/tips.zunix.org/?p=79</link>
	</item>
	<item>
		<title>What is MTU? Where is it set?</title>
		<description>	MTU: Maximum Transfer Unit. It is calculated in bytes. For example, commonly for ethernet devices the MTU is set to 1500.
	MTU is set in the device configuration settings for Ethernet, Token ring etc.
	==
In computer networking, the term Maximum Transmission Unit (MTU) refers to the size (in bytes) of the largest ...</description>
		<link>http://zort.org/tips.zunix.org/?p=78</link>
	</item>
	<item>
		<title>What is 2 raised to the power of 10 (2^10)?</title>
		<description>	In computer sciece:
	2^10 = 1,024
	        * the digital approximation of the kilo-, or 1,000 multiplier, which causes a change of prefix. For example: 1,024 bytes = 1 kilobyte (or kibibyte).
        * This number has no special ...</description>
		<link>http://zort.org/tips.zunix.org/?p=77</link>
	</item>
	<item>
		<title>What is the command format to monitor only the SYN packet with tcpdump?</title>
		<description>	Here it is:
	tcpdump tcp[13] == 2
	Here, tcp[13] contains the value of the 13th octet in the TCP header. And, to match only SYN packets, this value must be equal to 2 when interpreted as a 8-bit unsigned integer in network byte order.
	Follow-up question: what would be the tcpdump format to ...</description>
		<link>http://zort.org/tips.zunix.org/?p=76</link>
	</item>
	<item>
		<title>How to monitor ICMP packets that are not ping packets with tcpdump?</title>
		<description>	Here is the command:
	tcpdump &#8216;icmp[icmptype] != icmp-echo and icmp[icmptype] != icmp-echoreply&#8217;
 </description>
		<link>http://zort.org/tips.zunix.org/?p=75</link>
	</item>
	<item>
		<title>How do you turn the bell (that annoying noise) off when you are in X windows console?</title>
		<description>	To turn off bell:
	
xset -b b off
	To turn it back on:
	xset -b b
 </description>
		<link>http://zort.org/tips.zunix.org/?p=74</link>
	</item>
	<item>
		<title>How would you find a bash string variables length?</title>
		<description>	Two ways: using &#8216;expr&#8217; or ${#variable}. Example:
	zia@lappy:~$ string=supercalifragilisticexpialidocious
zia@lappy:~$ echo ${#string}
34
zia@lappy:~$ expr length $string
34
zia@lappy:~$ expr &#8220;$string&#8221; : &#8216;.*&#8217;
34
zia@lappy:~$ expr match &#8220;$string&#8221; &#8216;.*&#8217;
34

	Source: http://www.tldp.org/LDP/abs/html/string-manipulation.html

 </description>
		<link>http://zort.org/tips.zunix.org/?p=73</link>
	</item>
	<item>
		<title>What are the special characters of Bash?</title>
		<description>	
	
	
	#
	 Comments. (with exception of &#8220;#!&#8221;).
	
	
	;
	 Command separator (semicolon).
	
	
	;;
	 Terminator in a &#8216;case&#8217; option (double semicolon)
	
	
	.
	 &#8220;dot&#8221; command (period). Equivalent to &#8220;source;&#8221; or &#8220;dot&#8221; as a componant of a filename or &#8220;dot&#8221; character match in regular expression.
      
	
	
	&#8220;
	 partial quoting (double quote)
	
	
	&#8216;
	 full quoting (single ...</description>
		<link>http://zort.org/tips.zunix.org/?p=71</link>
	</item>
	<item>
		<title>How do you view the routing table?</title>
		<description>	Mostly in linux:
	route -rn
	Almost all *nix:
	netsat -rn
 </description>
		<link>http://zort.org/tips.zunix.org/?p=70</link>
	</item>
	<item>
		<title>What is the difference between a single-quote, a quote, and a back-tick in the shell?</title>
		<description>	Single quote: variables ($), backticks (&#8220;) &#038; backslash (\) are not treated specially in single quote.
Example:
	zia@lappy:~$ echo &#8216;$(ls -al t*)&#8217;
$(ls -al t*)
zia@lappy:~$ echo &#8216;`ls -lah t*`&#8217;
`ls -lah t*`
zia@lappy:~$ echo &#8216;`ls -lah t*` \&#8221;&#8216;
`ls -lah t*` \&#8221;
	Synopsis: with single-quote, the special characters (i.e. $, &#8220;, \ etc.) are not treated specially, ...</description>
		<link>http://zort.org/tips.zunix.org/?p=69</link>
	</item>
</channel>
</rss>
