<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="http://rss.egloos.com/style/blog.xsl" type="text/xsl" media="screen"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
	<title>이유없음</title>
	<link>http://euupsm.egloos.com</link>
	<description>이유없음</description>
	<language>ko</language>
	<pubDate>Sun, 08 Mar 2009 23:28:16 GMT</pubDate>
	<generator>Egloos</generator>
	<image>
		<title>이유없음</title>
		<url>http://pds4.egloos.com/logo/200612/18/43/d0049143.jpg</url>
		<link>http://euupsm.egloos.com</link>
		<width>80</width>
		<height>61</height>
		<description>이유없음</description>
	</image>
  	<item>
		<title><![CDATA[ ascii  ]]> </title>
		<link>http://euupsm.egloos.com/2256098</link>
		<guid>http://euupsm.egloos.com/2256098</guid>
		<description>
			<![CDATA[ 
  <h2 class="H1"><br>함수 이름 : ascii <br>의미 : </h2><pre class="CE"><p class="BP"><code>ASCII</code> returns the decimal representation in the database character set of the first character of <em><code>char</code></em>.</p><a name="1056813"></a><p class="BP"><em><code>char</code></em> can be of datatype <code>CHAR</code>, <code>VARCHAR2</code>, <code>NCHAR</code>, or <code>NVARCHAR2</code>. The value returned is of datatype <code>NUMBER</code>. <br>If your database character set is 7-bit ASCII, then this function returns an ASCII value.<br>If your database character set is EBCDIC Code, then this function returns an EBCDIC value. <br>There is no corresponding EBCDIC character function.</p><br>아스키는  DB에 있는 케릭터 셋에 맞춰 입력된 문자 중에 첫번 째 문자를 10진수 표기법으로 리턴한다.<br>이때 입력되는 문자의 형태는  <code>CHAR</code>, <code>VARCHAR2</code>, <code>NCHAR</code>, or <code>NVARCHAR2가 될 수 있으며<br></code>리턴되는 값은 숫자의 형태로 리턴된다.<br>데이타 베이스의 캐릭터 셋의 설정에 따라 맞는 값이 출력된다 (ex : 7-bit ascii, EBCDIC 등)<br><br><br> <br><br><br><br><br><br>생각한 예제 <br><br>select ascii('&amp;ascinput') from dual;<br><br>결과 : ascinput 이라는 변수에 입력을 하면 아스키 코드가 나온다. <br>팁 : isql plus 에서는 실행되지 않는다.<br>    문자열 ABCDE 와 같이 입력한 경우 맨 앞 문자인 A 의 아스키 코드인 65가 리턴된다<br><br> <br><br>이런 식으로 문자의 아스키 코드를 알아 낸 후 나중에<br>아스키 코드로 다음과 같은 예제와 함께 쓸 수 있을 듯 하다.<br><br><br><br><br>     <br><br><br><br><br>10g 메뉴얼에 소개된 예제 <br><br><br><br><br><br><br>SELECT last_name FROM employees   WHERE ASCII(SUBSTR(last_name, 1, 1,)) = 76; LAST_NAME-------------------------LadwigLandryLeeLivingston<br>쿼리의미 : emp 테이블에서 라스트 네임의 첫글짜의 아스키 코드가 76인 사람의 last name 을 보여줘라<br>p.s. : 아스키 코드의 활용 빈도..에 대한 의문?<br><br>  <br> <br><br>오라클 메뉴얼의 설명과 캐릭터 셋 코드 표<br><br><br><br><h2 class="H1"><span style="COLOR: #330099; FONT-FAMILY: Helvetica">Oracle9<i>i</i> SQL Reference<br>Release 2 (9.2)</span><br><br><br><a name="SQLRF00604"><span style="COLOR: #330099; FONT-FAMILY: Arial, Helvetica, sans-serif">ASCII</span></a></h2><!--/TOC=h1--><a name="1150418"></a><h4 class="SH1"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif">Syntax</span></h4><a name="1018819"></a><p class="SY"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong class="Bold">ascii::=</strong></span></p><a name="81943"><img alt="Text description of functions15.gif follows" src="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/functions15.gif"></a> <a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/img_text/ascii.htm"><br>Text description of ascii</a><br><br><a name="81944"></a><h4 class="SH1"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif">Purpose</span></h4><a name="81955"></a><p class="BP"><code>ASCII</code> returns the decimal representation in the database character set of the first character of <em><code>char</code></em>.</p><a name="1056813"></a><p class="BP"><em><code>char</code></em> can be of datatype <code>CHAR</code>, <code>VARCHAR2</code>, <code>NCHAR</code>, or <code>NVARCHAR2</code>. The value returned is of datatype <code>NUMBER</code>. If your database character set is 7-bit ASCII, then this function returns an ASCII value. If your database character set is EBCDIC Code, then this function returns an EBCDIC value. There is no corresponding EBCDIC character function.</p><a name="1180717"></a><div align="center"><table class="Note" dir="ltr" title="This is a layout table to format a note" cellspacing="0" cellpadding="0" width="80%" summary="This is a layout table to format a note" border="0"><tbody><tr class="Note"><td class="Note"><hr><a name="1180709"></a><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong class="NH">Note:</strong></span> <a name="1180710"></a><p class="NB">This function does not support <code>CLOB</code> data directly. However, <code>CLOB</code>s can be passed in as arguments through implicit data conversion. Please refer to <a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/sql_elements2a.htm#54959">"Datatype Comparison Rules"</a><a href="http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96540/sql_elements2a.htm#54959"></a> for more information.</p><hr><br></td></tr></tbody></table></div><a name="1056828"></a><h4 class="SH1"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif">Examples</span></h4><a name="1024424"></a><p class="BP">The following example returns the ASCII decimal equivalent of the letter Q:</p><pre class="CE"><a name="1024425"></a>SELECT ASCII('Q') FROM DUAL;<a name="81964"></a> <a name="81965"></a>ASCII('Q')<a name="81966"></a>----------<a name="81967"></a>        81<br><br><br><br><h5 class="TT"><a name="46691"></a><a name="46532"></a><strong><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><em>Table 2-8 &nbsp; ASCII Character Set</em></span></strong></h5><table class="HRuleFormal" dir="ltr" title="" cellspacing="0" cellpadding="3" rules="rows" width="100%" summary="" border="1" frame="hsides"><thead><tr class="Formal"><th class="Formal" valign="bottom" scope="col" align="left"><a name="46540"></a><p class="THC" align="center"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong>Symbol</strong></span></p></th><th class="Formal" valign="bottom" scope="col" align="left"><a name="46542"></a><p class="THC" align="center"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong>Decimal value</strong></span></p></th><th class="Formal" valign="bottom" scope="col" align="left"><a name="46544"></a><p class="THC" align="center"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong>Symbol</strong></span></p></th><th class="Formal" valign="bottom" scope="col" align="left"><a name="46546"></a><p class="THC" align="center"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong>Decimal value</strong></span></p></th></tr></thead><tbody><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46548"></a><p class="TB"><code>blank</code></p></td><td class="Formal"><a name="46550"></a><p class="TB"><code>32</code></p></td><td class="Formal"><a name="46552"></a><p class="TB"><code>;</code></p></td><td class="Formal"><a name="46554"></a><p class="TB"><code>59</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46556"></a><p class="TB"><code>!</code></p></td><td class="Formal"><a name="46558"></a><p class="TB"><code>33</code></p></td><td class="Formal"><a name="46560"></a><p class="TB"><code>&lt;</code></p></td><td class="Formal"><a name="46562"></a><p class="TB"><code>60</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46564"></a><p class="TB"><code>"</code></p></td><td class="Formal"><a name="46566"></a><p class="TB"><code>34</code></p></td><td class="Formal"><a name="46568"></a><p class="TB"><code>=</code></p></td><td class="Formal"><a name="46570"></a><p class="TB"><code>61</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46572"></a><p class="TB"><code>#</code></p></td><td class="Formal"><a name="46574"></a><p class="TB"><code>35</code></p></td><td class="Formal"><a name="46576"></a><p class="TB"><code>&gt;</code></p></td><td class="Formal"><a name="46578"></a><p class="TB"><code>62</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46580"></a><p class="TB"><code>$</code></p></td><td class="Formal"><a name="46582"></a><p class="TB"><code>36</code></p></td><td class="Formal"><a name="46584"></a><p class="TB"><code>?</code></p></td><td class="Formal"><a name="46586"></a><p class="TB"><code>63</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46588"></a><p class="TB"><code>%</code></p></td><td class="Formal"><a name="46590"></a><p class="TB"><code>37</code></p></td><td class="Formal"><a name="46592"></a><p class="TB"><code>@</code></p></td><td class="Formal"><a name="46594"></a><p class="TB"><code>64</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46596"></a><p class="TB"><code>&amp;</code></p></td><td class="Formal"><a name="46598"></a><p class="TB"><code>38</code></p></td><td class="Formal"><a name="46600"></a><p class="TB"><code>A-Z</code></p></td><td class="Formal"><a name="46602"></a><p class="TB"><code>65-90</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46604"></a><p class="TB"><code>'</code></p></td><td class="Formal"><a name="46606"></a><p class="TB"><code>39</code></p></td><td class="Formal"><a name="46608"></a><p class="TB"><code>[</code></p></td><td class="Formal"><a name="46610"></a><p class="TB"><code>91</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46612"></a><p class="TB"><code>(</code></p></td><td class="Formal"><a name="46614"></a><p class="TB"><code>40</code></p></td><td class="Formal"><a name="46616"></a><p class="TB"><code>\</code></p></td><td class="Formal"><a name="46618"></a><p class="TB"><code>92</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46620"></a><p class="TB"><code>)</code></p></td><td class="Formal"><a name="46622"></a><p class="TB"><code>41</code></p></td><td class="Formal"><a name="46624"></a><p class="TB"><code>]</code></p></td><td class="Formal"><a name="46626"></a><p class="TB"><code>93</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46628"></a><p class="TB"><code>*</code></p></td><td class="Formal"><a name="46630"></a><p class="TB"><code>42</code></p></td><td class="Formal"><a name="46632"></a><p class="TB"><code>^</code></p></td><td class="Formal"><a name="46634"></a><p class="TB"><code>94</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46636"></a><p class="TB"><code>+</code></p></td><td class="Formal"><a name="46638"></a><p class="TB"><code>43</code></p></td><td class="Formal"><a name="46640"></a><p class="TB"><code>_</code></p></td><td class="Formal"><a name="46642"></a><p class="TB"><code>95</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46644"></a><p class="TB"><code>,</code></p></td><td class="Formal"><a name="46646"></a><p class="TB"><code>44</code></p></td><td class="Formal"><a name="46648"></a><p class="TB"><code>`</code></p></td><td class="Formal"><a name="46650"></a><p class="TB"><code>96</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46652"></a><p class="TB"><code>-</code></p></td><td class="Formal"><a name="46654"></a><p class="TB"><code>45</code></p></td><td class="Formal"><a name="46656"></a><p class="TB"><code>a-z</code></p></td><td class="Formal"><a name="46658"></a><p class="TB"><code>97-122</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46660"></a><p class="TB"><code>.</code></p></td><td class="Formal"><a name="46662"></a><p class="TB"><code>46</code></p></td><td class="Formal"><a name="46664"></a><p class="TB"><code>{</code></p></td><td class="Formal"><a name="46666"></a><p class="TB"><code>123</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46668"></a><p class="TB"><code>/</code></p></td><td class="Formal"><a name="46670"></a><p class="TB"><code>47</code></p></td><td class="Formal"><a name="46672"></a><p class="TB"><code>|</code></p></td><td class="Formal"><a name="46674"></a><p class="TB"><code>124</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46676"></a><p class="TB"><code>0-9</code></p></td><td class="Formal"><a name="46678"></a><p class="TB"><code>48-57</code></p></td><td class="Formal"><a name="46680"></a><p class="TB"><code>}</code></p></td><td class="Formal"><a name="46682"></a><p class="TB"><code>125</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46684"></a><p class="TB"><code>:</code></p></td><td class="Formal"><a name="46686"></a><p class="TB"><code>58</code></p></td><td class="Formal"><a name="46688"></a><p class="TB"><code>~</code></p></td><td class="Formal"><a name="46690"></a><p class="TB"><code>126</code></p></td></tr></tbody></table><a name="46692"></a><a name="46839"></a><h5 class="TT"><a name="46839"></a><a name="46696"></a><strong><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><em>Table 2-9 EBCDIC Character Set</em></span></strong></h5><table class="HRuleFormal" dir="ltr" title="" cellspacing="0" cellpadding="3" rules="rows" width="100%" summary="" border="1" frame="hsides"><thead><tr class="Formal"><th class="Formal" valign="bottom" scope="col" align="left"><a name="46704"></a><p class="THC" align="center"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong>Symbol</strong></span></p></th><th class="Formal" valign="bottom" scope="col" align="left"><a name="46706"></a><p class="THC" align="center"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong>Decimal value</strong></span></p></th><th class="Formal" valign="bottom" scope="col" align="left"><a name="46708"></a><p class="THC" align="center"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong>Symbol</strong></span></p></th><th class="Formal" valign="bottom" scope="col" align="left"><a name="46710"></a><p class="THC" align="center"><span style="FONT-FAMILY: Arial, Helvetica, sans-serif"><strong>Decimal value</strong></span></p></th></tr></thead><tbody><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46712"></a><p class="TB"><code>blank</code></p></td><td class="Formal"><a name="46714"></a><p class="TB"><code>64</code></p></td><td class="Formal"><a name="46716"></a><p class="TB"><code>%</code></p></td><td class="Formal"><a name="46718"></a><p class="TB"><code>108</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46720"></a><p class="TB"><code>¢</code></p></td><td class="Formal"><a name="46722"></a><p class="TB"><code>74</code></p></td><td class="Formal"><a name="46724"></a><p class="TB"><code>_</code></p></td><td class="Formal"><a name="46726"></a><p class="TB"><code>109</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46728"></a><p class="TB"><code>.</code></p></td><td class="Formal"><a name="46730"></a><p class="TB"><code>75</code></p></td><td class="Formal"><a name="46732"></a><p class="TB"><code>&gt;</code></p></td><td class="Formal"><a name="46734"></a><p class="TB"><code>110</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46736"></a><p class="TB"><code>&lt;</code></p></td><td class="Formal"><a name="46738"></a><p class="TB"><code>76</code></p></td><td class="Formal"><a name="46740"></a><p class="TB"><code>?</code></p></td><td class="Formal"><a name="46742"></a><p class="TB"><code>111</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46744"></a><p class="TB"><code>(</code></p></td><td class="Formal"><a name="46746"></a><p class="TB"><code>77</code></p></td><td class="Formal"><a name="46748"></a><p class="TB"><code>:</code></p></td><td class="Formal"><a name="46750"></a><p class="TB"><code>122</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46752"></a><p class="TB"><code>+</code></p></td><td class="Formal"><a name="46754"></a><p class="TB"><code>78</code></p></td><td class="Formal"><a name="46756"></a><p class="TB"><code>#</code></p></td><td class="Formal"><a name="46758"></a><p class="TB"><code>123</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46760"></a><p class="TB"><code>|</code></p></td><td class="Formal"><a name="46762"></a><p class="TB"><code>79</code></p></td><td class="Formal"><a name="46764"></a><p class="TB"><code>@</code></p></td><td class="Formal"><a name="46766"></a><p class="TB"><code>124</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46768"></a><p class="TB"><code>&amp;</code></p></td><td class="Formal"><a name="46770"></a><p class="TB"><code>80</code></p></td><td class="Formal"><a name="46772"></a><p class="TB"><code>'</code></p></td><td class="Formal"><a name="46774"></a><p class="TB"><code>125</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46776"></a><p class="TB"><code>!</code></p></td><td class="Formal"><a name="46778"></a><p class="TB"><code>90</code></p></td><td class="Formal"><a name="46780"></a><p class="TB"><code>=</code></p></td><td class="Formal"><a name="46782"></a><p class="TB"><code>126</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46784"></a><p class="TB"><code>$</code></p></td><td class="Formal"><a name="46786"></a><p class="TB"><code>91</code></p></td><td class="Formal"><a name="46788"></a><p class="TB"><code>"</code></p></td><td class="Formal"><a name="46790"></a><p class="TB"><code>127</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46792"></a><p class="TB"><code>*</code></p></td><td class="Formal"><a name="46794"></a><p class="TB"><code>92</code></p></td><td class="Formal"><a name="46796"></a><p class="TB"><code>a-i</code></p></td><td class="Formal"><a name="46798"></a><p class="TB"><code>129-137</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46800"></a><p class="TB"><code>)</code></p></td><td class="Formal"><a name="46802"></a><p class="TB"><code>93</code></p></td><td class="Formal"><a name="46804"></a><p class="TB"><code>j-r</code></p></td><td class="Formal"><a name="46806"></a><p class="TB"><code>145-153</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46808"></a><p class="TB"><code>;</code></p></td><td class="Formal"><a name="46810"></a><p class="TB"><code>94</code></p></td><td class="Formal"><a name="46812"></a><p class="TB"><code>s-z</code></p></td><td class="Formal"><a name="46814"></a><p class="TB"><code>162-169</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46816"></a><p class="TB"><code>ÿ</code></p></td><td class="Formal"><a name="46818"></a><p class="TB"><code>95</code></p></td><td class="Formal"><a name="46820"></a><p class="TB"><code>A-I</code></p></td><td class="Formal"><a name="46822"></a><p class="TB"><code>193-201</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46824"></a><p class="TB"><code>-</code></p></td><td class="Formal"><a name="46826"></a><p class="TB"><code>96</code></p></td><td class="Formal"><a name="46828"></a><p class="TB"><code>J-R</code></p></td><td class="Formal"><a name="46830"></a><p class="TB"><code>209-217</code></p></td></tr><tr class="Formal" valign="top" align="left"><td class="Formal"><a name="46832"></a><p class="TB"><code>/</code></p></td><td class="Formal"><a name="46834"></a><p class="TB"><code>97</code></p></td><td class="Formal"><a name="46836"></a><p class="TB"><code>S-Z</code></p></td><td class="Formal"><a name="46838"></a><p class="TB"><code>226-233</code></p></td></tr></tbody></table><br><br><br><br><br><br><br><br><br><br><br></pre></pre><!-- Start Footer --><br/><br/>tag : <a href="/tag/oracle" rel="tag">oracle</a>,&nbsp;<a href="/tag/function" rel="tag">function</a>,&nbsp;<a href="/tag/ascii" rel="tag">ascii</a>,&nbsp;<a href="/tag/아스키" rel="tag">아스키</a>,&nbsp;<a href="/tag/함수" rel="tag">함수</a>			 ]]> 
		</description>
		<category>Oracle</category>
		<category>oracle</category>
		<category>function</category>
		<category>ascii</category>
		<category>아스키</category>
		<category>함수</category>

		<comments>http://euupsm.egloos.com/2256098#comments</comments>
		<pubDate>Sun, 08 Mar 2009 23:28:16 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 정보처리 기능사 필기 기출문제. ]]> </title>
		<link>http://euupsm.egloos.com/2252423</link>
		<guid>http://euupsm.egloos.com/2252423</guid>
		<description>
			<![CDATA[ 
  <div id="1-1"><embed src="http://www.gunsys.com/ad_cbt/dst_frm/p_ginung.swf" width="325" height="235" type="application/x-shockwave-flash" allowfullscreen="true"></embed> </div>			 ]]> 
		</description>
		<category>O/S</category>

		<comments>http://euupsm.egloos.com/2252423#comments</comments>
		<pubDate>Wed, 04 Mar 2009 18:38:57 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 0303  ]]> </title>
		<link>http://euupsm.egloos.com/2250989</link>
		<guid>http://euupsm.egloos.com/2250989</guid>
		<description>
			<![CDATA[ 
  <p><br>-- ic.bat ----------------------------------</p><p>set path=D:\ora\instantclient-11.1<br>sqlplus <a href="mailto:hr30/hr30@172.16.14.1:1521/orcl">hr30/hr30@172.16.14.1:1521/orcl</a></p><p>--------------------------------------------</p><p># 1-12 </p><p>select empno, ename, sal, comm, sal*12+nvl(comm, 0)<br>from emp;</p><p># 1-14</p><p>select empno, ename, sal, comm, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sal*12+nvl(comm, 0)&nbsp;&nbsp;&nbsp; ann_sal, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sal*12+nvl(comm, 0) as ann_sal, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sal*12+nvl(comm, 0)&nbsp;&nbsp; "$Ann Sal"<br>from emp;</p><p># 1-16, 17</p><p>select empno, ename, sal, comm, 'ABC', 2000<br>from emp;</p><p>select empno, ename, ' is a ', job, sal, comm<br>from emp;</p><p>select empno, ename||' is a '||job as sawon, sal, comm<br>from emp;</p><p>select empno, ename, substr(ename, 1, 1) as part1, substr(ename, 2 </p><p>) as part2<br>from emp;</p><p>select empno, ename, length(ename)<br>from emp;</p><p>-- 9i 까지<br>select&nbsp; ename|| ' ''s house is bigger than Tom'' s'<br>from emp;</p><p>-- 10g 이후<br>select ename|| q' [ 's house is bigger than Tom's] '<br>select ename|| q' ! 's house is bigger than Tom's! '<br>select ename|| q' X 's house is bigger than Tom'sX '<br>from emp;</p><p>select unique job <br>from emp;<br><br></p><p>select DISTINCT job <br>from emp;</p><p>select DISTINCT deptno, job&nbsp;&nbsp; <strong><span style="COLOR: #009900">/* 뒤에 나오는 모든 열에 적용되어 영향을 준다. */</span><br></strong>from emp;</p><p>&nbsp;</p>			 ]]> 
		</description>

		<comments>http://euupsm.egloos.com/2250989#comments</comments>
		<pubDate>Tue, 03 Mar 2009 08:24:37 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 기호  ]]> </title>
		<link>http://euupsm.egloos.com/2250960</link>
		<guid>http://euupsm.egloos.com/2250960</guid>
		<description>
			<![CDATA[ 
  () parenthesis =&nbsp;a round bracket <br>{} a brace<br>[] a bracket ( a square bracket) <br><br>- Defining a Null Value<br><br>▶&nbsp;Null is not 0 (Zero)<br>▶ Null is not space<br>▶ Null is&nbsp;null -&gt; 진리값 = null (모르는 것끼리 비교한 값에 대한 결과는 Null 모른다..)<br><br>산술연산 결과 = null<br>비교연산 결과 = null<br>논리 연산 = 진리표<br><table class="datatable" style="WIDTH: 30.72%; HEIGHT: 97px"><thead><tr><th>AND</th><th>T</th><th>F</th><th>NULL</th></tr></thead><tbody><tr><th>T</th><td>T</td><td>F</td><td>N</td></tr><tr><th>F</th><td>F</td><td>F</td><td>F</td></tr><tr><th>NULL</th><td>N</td><td>F</td><td>N</td></tr></tbody></table><table class="datatable" style="WIDTH: 30.72%; HEIGHT: 97px"><thead><tr><th>&nbsp;OR</th><th>T</th><th>F</th><th>NULL</th></tr></thead><tbody><tr><th>T</th><td>T</td><td>T</td><td>T</td></tr><tr><th>F</th><td>T</td><td>F</td><td>N</td></tr><tr><th>NULL<br></th><td>T<br></td><td>N<br></td><td>N<br></td></tr></tbody></table><br><br><p><font size="3"><strong>SQL문</strong></font></p><p><font size="3">&nbsp;</font>&nbsp;Select *&nbsp;&nbsp; --&gt; 절</p><p>&nbsp;&nbsp;From emp; --&gt; 절 ========&gt; (절 + 절 = 문), 문장 종결자로 세미콜론 사용</p><ul><li>대소문자 구분하지 않음 <li><p><span style="COLOR: #fe0000">Null</span> :&nbsp;<span style="COLOR: #0000fe">0값 아님, 공백 아님, 할당,연산,비교 연산자 아님</span> ===&gt; <strong><span style="BACKGROUND-COLOR: #ffcc66">해당사항 없음 정도로 해석 가능</span></strong></p><p><span style="BACKGROUND-COLOR: #b0eefb">cf) set null "널이네"</span></p><li>alias&nbsp;설정하기 : 공백 이후 적거나 as 혹은 더블 코테이션("") 사용 <li>&nbsp; <li>SAVE 명령어 :&nbsp;EX) SAVE A1.SQL <li><p>주석처리&nbsp; ---&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span style="COLOR: #d61a00">/** 주석처리부분 */</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;또는&nbsp;&nbsp;&nbsp; 내용&nbsp;<span style="COLOR: #d61a00">--&nbsp;주석처리부분(한줄 처리)</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt;--- 이렇게 하세요.</p><p><span style="FONT-SIZE: 130%"><font size="3"><span style="FONT-SIZE: 100%">eg)&nbsp;&nbsp; WHERE JOB = 'SALESMAN'</span></font></span></p><p><span style="FONT-SIZE: 130%"><span style="FONT-SIZE: 100%"><font size="3">&nbsp;</font> <strong><span style="COLOR: #d61a00">/* AND E.DEPTNO = D.DEPTNO */</span> <span style="COLOR: #000000">AND D.LOC='DALLAS'</span></strong></span></span></p><p><span style="FONT-SIZE: 130%"><font size="3"><span style="FONT-SIZE: 100%">또는&nbsp; WHERE JOB = 'SALESMAN'</span></font></span></p><p><span style="FONT-SIZE: 130%"><span style="FONT-SIZE: 100%"><font size="3">&nbsp;</font> <span style="COLOR: #d61a00"><strong>--</strong> AND E.DEPTNO = D.DEPTNO AND D.LOC='DALLAS'</span></span></span></p><p><span style="COLOR: #000000"><span style="FONT-SIZE: 100%">차이은 <span style="COLOR: #fe0000">--</span>의 경우&nbsp;뒤에 오는 모든 것을 주석처리한다는 것이고, <span style="COLOR: #fe0000">/*내용*/</span>의 경우 <span style="COLOR: #fe0000">*/</span>이 끝나는 지점까지만 주석처리된다는 것이다.</span></span></p><li><p><span style="COLOR: #000000">SINGLE QUATATION은 컬럼 헤딩에 사용할 수 있...</span></p><p>&gt; SELECT EMPNO, '사원 월급' || SAL AS "월급" FROM EMP;</p></li></ul><p>&nbsp;</p><ul><li><p>&nbsp;비교연산자 : &lt; , &gt; , =, &gt;=, &lt;=, != OR &lt;&gt;</p><p>&gt; SELECT EMPNO, ENAME, SAL FROM EMP WHERE SAL &gt;= 3000;</p></li></ul><p>&nbsp;</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&nbsp;<span style="BACKGROUND-COLOR: #aeff66">SELECT ASCII('A')&nbsp; FROM DUAL;</span></p><p>&nbsp;</p><ul><li>논리연산자 : NOT - AND - OR (순서별) <li><p>진리표</p><table class="datatable" style="WIDTH: 30.72%; HEIGHT: 97px"><thead><tr><th>&nbsp;AND</th><th>T</th><th>F</th><th>NULL</th></tr></thead><tbody><tr><th>T</th><td>T</td><td>F</td><td>N</td></tr><tr><th>F</th><td>F</td><td>F</td><td>F</td></tr><tr><th>NULL</th><td>N</td><td>F</td><td>N</td></tr></tbody></table><table class="datatable" style="WIDTH: 30.72%; HEIGHT: 97px"><thead><tr><th>&nbsp;OR</th><th>T</th><th>F</th><th>NULL</th></tr></thead><tbody><tr><th>T</th><td>T</td><td>T</td><td>T</td></tr><tr><th>F</th><td>T</td><td>F</td><td>N</td></tr><tr><th>NULL</th><td>T</td><td>N</td><td>N<br></td></tr></tbody></table><li><p>날짜 : BC 4712/01/01 ~ 9999/12/13 : 연산자로 비교할 수 있다</p><p>&gt; EX) SELECT EMPNO, ENAME, HIREDATE</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM EMP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; WHERE HIREDATE &gt;= '81/01/01';</p></li></ul><p>&nbsp;</p><ul><li><p>SQL 과 SQLPLUS의 차이점</p><table class="datatable" style="WIDTH: 70.15%; HEIGHT: 217px"><thead><tr><th>SQL</th><th>SQL*PLUS</th></tr></thead><tbody><tr><td><p>&nbsp;ANSI</p><p>&nbsp;;&nbsp;를 사용하는 명령어</p><p>EX) SELECT</p><p>&nbsp;</p><p>특징 : 축약이 불가, 버퍼사용가능, 초급사용자 쉽다(영어 언어구조)</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 변수&nbsp;사용불가, 제어문 사용 불가</p><p>&nbsp;</p></td><td><p>&nbsp;ORACLE</p><p>&nbsp;</p><p>EX) SAVE, SPOOL, DESC</p><p>축약 가능</p><p>버퍼사용불가</p></td></tr></tbody></table></li></ul><p>&nbsp;&nbsp;&nbsp;&nbsp; <span style="BACKGROUND-COLOR: #fbbdb0"><span style="BACKGROUND-COLOR: #ffffff">버퍼사용시 주의점 :</span>&nbsp;1. 버퍼내에서는&nbsp;반드시 하나의 SQL문만 사용가능</span></p><p style="MARGIN-LEFT: 10em">&nbsp;&nbsp; <span style="BACKGROUND-COLOR: #fbbdb0">2. 문장종결자&nbsp;==&gt; 다음 란인 첫글자에 / 대신, ;는 사용치 않음</span></p><p>&nbsp;</p><ul><li>&nbsp;SQL 함수 : BETWEEN A AND B , IN <li><p>&nbsp;와일드&nbsp;캐릭터 : %, ?, _</p><p>&gt; 와일드 캐릭터를 일반 문자로 인식 시키기 위해서는 다음과 같이 사용한다</p><p>&nbsp;&nbsp; EX) SELECT ENAME</p><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM EMP</p><p style="MARGIN-LEFT: 2em">&nbsp;&nbsp; WHERE ENAME LIKE '%\%' <span style="BACKGROUND-COLOR: #b0eefb">ESCAPE '\';</span></p></li></ul><p>&nbsp;</p><ul><li><p>&nbsp;WHERE CONDITION</p><ul><li><p>연산자 : 비교연산자, 논리연산자, IN, BETWEEN, LIKE, IS&nbsp; (비교연산자와 논리연산자를 제외한 나머지 것들은 부정시 NOT을 쓴다.)</p><p>&nbsp;</p></li></ul><li><p>정렬하기 :&nbsp;ORDER BY ASC(오름차순), DESC(내림차순) : DEFAULT : ASC</p><p>&nbsp;EX) SELECT EMPNO, ENAME, SAL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM EMP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY SAL DESC, ENAME DESC;</p><p>&nbsp;</p><ul><li><p>ALIAS를 정렬 조건에 사용할 수 있다.</p><p>EX) SELECT EMPNO, ENAME, SAL*12 + COMM ANNSAL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM EMP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY ANNSAL DESC</p><li><p>&nbsp;컬럼의 위치로도 가능함</p><p>EX) SELECT EMPNO, ENAME, SAL*12 + COMM ANNSAL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM EMP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ORDER BY&nbsp;3 DESC&nbsp;&nbsp; &lt;---<span style="BACKGROUND-COLOR: #aeff66">select 절에서 3번째 컬럼을 기준으로 정렬하라.</span></p><li>order by 정렬을 통해 결과값 출력시에&nbsp;desc정렬을 하면, NULL값은 무한대값으로 치므로, NULL 값이 가장 상위에 표기된다. <li>SELECT 문에서 가장 마지막에 위치한 절</li></ul></li><li></li></ul>Concatenation Operator<br><br>Literal Character <br>			 ]]> 
		</description>

		<comments>http://euupsm.egloos.com/2250960#comments</comments>
		<pubDate>Tue, 03 Mar 2009 07:49:31 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ instant client 설치 배치파일  ]]> </title>
		<link>http://euupsm.egloos.com/2249948</link>
		<guid>http://euupsm.egloos.com/2249948</guid>
		<description>
			<![CDATA[ 
  a.bat<br><br>set path=D:\설치경로\instantclient-11.1<br>sqlplus <a href="mailto:id/passwd@ip:1521/orcl">id/passwd@ip:1521/orcl</a> <br><br><br><br><br>			 ]]> 
		</description>
		<category>Oracle</category>

		<comments>http://euupsm.egloos.com/2249948#comments</comments>
		<pubDate>Mon, 02 Mar 2009 08:03:20 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ SOLARIS 9 x 86 에 ORACLE10g R1 (1.0.3) 설치  ]]> </title>
		<link>http://euupsm.egloos.com/2247173</link>
		<guid>http://euupsm.egloos.com/2247173</guid>
		<description>
			<![CDATA[ 
  <strong><span style="FONT-SIZE: 130%"><div style="TEXT-ALIGN: center"><strong><span style="FONT-SIZE: 130%"><br><br>SOLARIS 9 x 86 에 ORACLE10g R1 (1.0.3) 설치</span></strong> </div></span></strong><p><br>1. 유저 생성 및 환경설정<br>======== root 계정으로 작업할 것 ============</p><p>- 그룹과 유저 생성 및 권한 부여 - </p><p>bash-2.05# groupadd -g 5000 dba<br>bash-2.05# useradd -g dba -d /export/home/oracle -s /bin/bash -m </p><p>oracle<br>bash-2.05# passwd oracle<br></p><div style="TEXT-ALIGN: center"><strong>- Oracle 10g 설치에 필요한 패키지 목록 1번 설치 CD에 있음<br></strong></div><p>oracle 10g r1 1.0.3 for solaris x86 을 winscp 로 넘길 것<br>ifconfig -a <br>솔라리스 ip <br>oracle / 패스 로 로그인<br>으로 접속<br><br><br><br>SUNWarc <br>SUNWbtool<br>SUNWWhea<br>SUNWlibm<br>SUNWlibms<br>SUNWsprot<br>SUNWtoo<br>SUNWi1of<br>SUNWi1cs<br>SUNWi15cs<br>SUNWxwfnt</p><p>확인하려면<br>bash-2.05# pkginfo -i SUNWarc 등등 으로 하면 됨 </p><p><br>&nbsp;</p><div style="TEXT-ALIGN: center"><strong>=== etc/system 커널 설정 하기 ==========</strong></div><p><br>bash-2.05#&nbsp; vi /etc/system</p><p>set noexec_user_stack=1<br>set semsys:seminfo_semmni=100<br>set semsys:seminfo_semmns=1024<br>set semsys:seminfo_semmsl=256<br>set semsys:seminfo_semvmx=32767<br>set shmsys:shminfo_hmmax=4294967295<br>set semsys:seminfo_shmmin=1<br>set semsys:seminfo_shmmni=100<br>set semsys:seminfo_shmseg=10</p><p>:wq!</p><p>&nbsp;</p><p>&nbsp;</p><p><br>&nbsp;</p><div style="TEXT-ALIGN: center"><strong>오라클 10G 설치 준비</strong></div><p>bash-2.05#&nbsp;&nbsp; ls Solarisx86_DB_10_1_0_3_Disk1.cpio.gz<br>bash-2.05#&nbsp; gunzip solarisx86_DB_10_1_0_3_Disk1.cpio.gz<br>bash-2.05#&nbsp; cpio -idmv &lt; solarisx86_DB_10_1_0_3_Disk1.cpio<br>bash-2.05#&nbsp; chown -R oracle:dba /export/home/oracle</p><p><br><strong>======&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /export/home/oracle/.profile 환경설정 추가 내용&nbsp; ====</strong></p><p>bash-2.05# vi .profile&nbsp;&nbsp;&nbsp; (pwd 는 /export/home/oracle)</p><p>export ORACLE_BASE=/export/home/oracle</p><p>export ORACLE_HOME=$ORACLE_BASE/product/10g</p><p>export ORACLE_SID=testdb</p><p>export ORACLE_OWNER=oracle</p><p>export PATH=$PATH:$ORACLE_HOME/bin</p><p>export LANG=ko_KR.UTF-8</p><p>export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601</p><p>export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data</p><p>export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib</p><p>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib</p><p>export TEMP=/tmp</p><p>export TMPDIR=/tmp</p><p>:wq!<br></p><p><strong>편집 내용이 적용되도록 리부팅할 것</strong> <br>bash-2.05# init 6&nbsp; ( 안될 경우는 ROOT 가 아닐 경우)<br><br></p><strong><span style="FONT-SIZE: 130%"><div style="TEXT-ALIGN: center"><strong><span style="FONT-SIZE: 130%">=========== Oracle 10g Install ============</span></strong></div><p></p></span><p></strong><br><strong>oracle 계정으로 로그인</strong> <br><strong>로그인 창에서 옵션 &gt;&gt; 언어 &gt;&gt; ko_KR.UTF-8(unicode) 로 설정<br></strong>콘솔 창 2개 띄우고 하나는 root 유저로 변경</p><p>bash-2.05# su - root<br>password : </p><p><strong>====&nbsp; 런 인스톨러 실행&nbsp;&nbsp;&nbsp; - oracle user 콘솔창 -</strong><br>bash-2.05# cd /export/home/oracle/Disk1<br>bash-2.05# ./runInstaller</p><p><br><strong>==== 인스톨 중 스크립트 실행 메시지가 뜨면 -root user 콘솔창 - 으로 실행</strong><br>bash-2.05#&nbsp; /export/home/oracle/oraInventory/orainstRoot.sh<br>스크립스 실행시 chmod 경고 뜨면 : "/var/opt/oraacle" 의 사용권한 에러 생김<br>chmod -R 777 /var/</p><p>bash-2.05# /export/home/oracle/product/10g/root.sh<br>(오라클 설치 디렉토리에서 할때..)</p><p>&nbsp;</p><br/><br/>tag : <a href="/tag/solaris9" rel="tag">solaris9</a>,&nbsp;<a href="/tag/oracle설치" rel="tag">oracle설치</a>,&nbsp;<a href="/tag/오라클" rel="tag">오라클</a>,&nbsp;<a href="/tag/설치" rel="tag">설치</a>,&nbsp;<a href="/tag/솔라리스9에오라클10g설치" rel="tag">솔라리스9에오라클10g설치</a>			 ]]> 
		</description>
		<category>solaris9</category>
		<category>oracle설치</category>
		<category>오라클</category>
		<category>설치</category>
		<category>솔라리스9에오라클10g설치</category>

		<comments>http://euupsm.egloos.com/2247173#comments</comments>
		<pubDate>Fri, 27 Feb 2009 06:34:55 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ Creating archives ]]> </title>
		<link>http://euupsm.egloos.com/2244327</link>
		<guid>http://euupsm.egloos.com/2244327</guid>
		<description>
			<![CDATA[ 
  1. 하나의 파일로 묶는 명령어<br>tar (tape archive) :&nbsp;<br>&nbsp; - 압축 기능은 없지만 미비한 효과는 있다. (fragmentation 줄임)<br><br>&nbsp; - 상대 경로명 사용하는 것이 효율적<br><br>2. 하나의 파일만 압축하는 명령어 <br>&nbsp; - 원본 파일은 삭제됨&nbsp;<br>&nbsp;&nbsp;- -c 옵션은 악축하거나 풀리는 것이 아니라 내용을 콘솔로 보여주는 '미리 보기' 기능을 한다.&nbsp;<br><br>1) compress vs uncompress<br>&nbsp; -&nbsp; 압축율이 가장 낮다<br>&nbsp; -&nbsp; '.z'&nbsp; 확장자가 붙는다.<br>&nbsp;&nbsp;- # compress -c files.tar&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;# compress -cv include.tar<br>&nbsp;&nbsp;&nbsp; # uncompress -v include.tar.Z<br>&nbsp;&nbsp;&nbsp; # zcat files.tar.Z<br>&nbsp;&nbsp;&nbsp; # uncompress -c file.tar.Z | tar zvf -&nbsp; =&gt;&nbsp; zcat file.tar.Z&nbsp;| tar xvf - <br><br>&nbsp; 2) gzip vs gunzip<br>&nbsp;&nbsp;&nbsp;&nbsp;- 압축율이 낮다.<br>&nbsp;&nbsp;&nbsp; - gz 확장자 붙음<br>&nbsp; - gzip { -cdrv }&nbsp;filename(s)<br>&nbsp; - gunzip { -crv} filename(s)<br>&nbsp; - gunzip -c = gzip -dc = gzcat<br>&nbsp;&nbsp;# gzip -c files.tar<br>&nbsp; # gzip -cv include.tar<br>&nbsp;&nbsp;# gunzip -v include.tar.gz<br>&nbsp; # gzcat files.tar.gz<br>&nbsp; # gzip -dc file.tar.gz | tar xvf -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt;&nbsp;&nbsp; #gunzip -c file.tar.gz | tar xvf-<br><br>&nbsp; 3) bzip2 vs bunzip2&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 압축률이 좋다.<br>&nbsp;&nbsp;&nbsp;&nbsp; - .bz 확장자가 붙는다.<br>&nbsp;&nbsp;&nbsp;&nbsp; - bzip2 { -cdkv } filename(S)<br>&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;bunzip2 &nbsp;{ -ckvz } filename(S)<br>&nbsp;&nbsp;&nbsp;&nbsp; - bunzip2 -c = bzip2 -dc = bzcat<br><br><span style="COLOR: #cc0000"><strong>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; -k 원본 파일을 보존한다.</strong></span>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp; -z 압축 기능으로 변경 <br><br><br>&nbsp;&nbsp;&nbsp; # bzip2 -c files.tar<br>&nbsp;&nbsp;&nbsp; # bzip2 -cv include.tar<br>&nbsp;&nbsp;&nbsp; # bunzip2 -v include.tar.bz<br>&nbsp;&nbsp;&nbsp; # bzcat files.tar.bz<br>&nbsp;&nbsp;&nbsp;&nbsp;# bzip2 -dc file.tar.bz | tar xvf -&nbsp;&nbsp; <br>=&gt;&nbsp;# bunzip2 -c file.tar.bz | tar xvf -<br><br><br>3. 파일과 디렉토리를 한꺼번에 압축하는 명령어 (zip vs unzip,&nbsp; jar)<br>&nbsp;&nbsp;- &nbsp;원본 파일은&nbsp;삭제되지 않는다.<br>&nbsp;&nbsp;-&nbsp;&nbsp;확장자는 명령어와 일관되게&nbsp;<br>&nbsp;&nbsp;-&nbsp;&nbsp;상호 호환됨 (zip, jar)<br>&nbsp;&nbsp;<br>&nbsp;&nbsp; (1) zip vs&nbsp;unzip<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&nbsp;압축율이 좋다.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- 실제 상대&nbsp;경로명으로 저장된다.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- command&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip {-rv} zipfile filename(s)&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;unzip {-lv} zipfile [-x filename(s) ]<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -r 은 하위 디렉토리까지 압축할 때 사용<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # zip file1.zip files1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # zip -rv etc.zip /etc<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # unzip -lv etc.zip<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # unzip -v etc.zip<br><br>&nbsp;파일 내용을&nbsp;Console&nbsp;로 보여주는 명령어&nbsp;<br><br>zcat&nbsp;<br><br>&nbsp;- zcat file.tar.Z = uncompress -c file.tar.Z = compress -dc file.ta.Z<br><br>&nbsp;- gzcat&nbsp;= gunzip -c file.tar.gz = gzip -dc file.tar.gz<br>&nbsp;<br>&nbsp;- bzcat =&nbsp;bzcat file.tar.bz2 = bunzip2 -c file.tar.bz2 = bzip2 -dc file.tar.gz<br><br><br>&nbsp;&nbsp; (2) <br>			 ]]> 
		</description>

		<comments>http://euupsm.egloos.com/2244327#comments</comments>
		<pubDate>Tue, 24 Feb 2009 08:10:05 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ 마운트... 파티션 파일 시스템 ... ]]> </title>
		<link>http://euupsm.egloos.com/2243253</link>
		<guid>http://euupsm.egloos.com/2243253</guid>
		<description>
			<![CDATA[ 
  리붓 하는 방법<br><br>touch /recounfigure &amp;&amp; reboot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp; 커널이 1번 쓰고 버리기 때문에 다시 설치 하려면 지우구 새로 만들어야 함..<br><br>cat /etc/path_to_inst<br><br>prtconf<br><br>리붓 안하는 방법<br><br>devfsadm<br><br>cat /etc/path_to_inst<br><br>add HDD<br><br>virtual hdd 추가 -&gt; 1기가 연습용 ide<br><br>devfsadm -c disk (새 하드 디스크 인식)<br><br>ls /dev/dsk<br><br>슬라이스 생성 <br>format : <br>1<br><br>파티션 설정 <br>format &gt; fdisk<br><br>format &gt; p&nbsp;&nbsp;&nbsp;&nbsp; (partition)<br><br>partition &gt; 1<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 300mb<br><br>파티션 설정 확인 <br><br>partition &gt; p<br>&nbsp;<br>파티션 쓰기 <br><br>partition &gt; label <br>yes or no &gt; y<br><br>partition &gt; q<br><br>설정 저장<br><br>format &gt; save<br>format &gt; ve<br>format &gt; quit<br><br>포맷<br># newfs /dev/rdsk/c0d1s1<br><br>마운트<br>1. mkdir /disk3<br>2. mount /dev/dsk/c0d1s1 /disk3<br><br>테스트<br>df -k<br>mkfile -n 10m testfile.disk<br><br>* 실린더 겹친 곳에 저장된 자료는 찾을 수 없음<br>* touch /recounfigure &amp;&amp; reboot&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;&nbsp;&nbsp; 커널이 1번 쓰고 버리기 때문에 다시 설치 하려면 지우구 새로 만들어야 함..<br>* unix 는 기본적으로 재부팅시 마운트 안됨 -&gt; 수동 마운트.. <br><br><br/><br/>tag : <a href="/tag/mount" rel="tag">mount</a>,&nbsp;<a href="/tag/마운트" rel="tag">마운트</a>,&nbsp;<a href="/tag/유닉스" rel="tag">유닉스</a>,&nbsp;<a href="/tag/format" rel="tag">format</a>,&nbsp;<a href="/tag/partition" rel="tag">partition</a>			 ]]> 
		</description>
		<category>O/S</category>
		<category>mount</category>
		<category>마운트</category>
		<category>유닉스</category>
		<category>format</category>
		<category>partition</category>

		<comments>http://euupsm.egloos.com/2243253#comments</comments>
		<pubDate>Mon, 23 Feb 2009 09:07:28 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ O/S 별 파티션과 파일시스템 생성 명령어 ]]> </title>
		<link>http://euupsm.egloos.com/2243138</link>
		<guid>http://euupsm.egloos.com/2243138</guid>
		<description>
			<![CDATA[ 
  <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>windows / Linux<br></strong>Partition 생성&nbsp; : FDISK<br>FIile System 생성 : Format<br><br>Solaris<br><br>Partition 생성&nbsp; : Format<br>FIile System 생성 : newfs</p><br/><br/>tag : <a href="/tag/solaris" rel="tag">solaris</a>,&nbsp;<a href="/tag/linux" rel="tag">linux</a>,&nbsp;<a href="/tag/windows" rel="tag">windows</a>,&nbsp;<a href="/tag/파티션" rel="tag">파티션</a>,&nbsp;<a href="/tag/파일시스템" rel="tag">파일시스템</a>			 ]]> 
		</description>
		<category>O/S</category>
		<category>solaris</category>
		<category>linux</category>
		<category>windows</category>
		<category>파티션</category>
		<category>파일시스템</category>

		<comments>http://euupsm.egloos.com/2243138#comments</comments>
		<pubDate>Mon, 23 Feb 2009 07:10:41 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
	<item>
		<title><![CDATA[ shell script와 tail로 구현하는 간단한 Install Script 만들기  ]]> </title>
		<link>http://euupsm.egloos.com/2242235</link>
		<guid>http://euupsm.egloos.com/2242235</guid>
		<description>
			<![CDATA[ 
  <h3><a id="s-2" name="s-2"></a>shell script와 tail로 구현하는 간단한 Install Script 만들기 <a class="perma" href="http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Tip/SelfExtractInstallScript?action=highlight&amp;value=Site#s-2"></a></h3><div>그렇다면 리눅스 뿐만이 아닌 다른 유닉스에서도 사용가능한 Install Script 프로그램을 만드는 방법에 대해서 알아보겠다. 일단 만들 Install script는 모든 유닉스에서 작동이 될 수 있다는 것을 보장해야 하므로, 유닉스에 기본적으로 설치되는 명령만을 가지고 작성을 해야 한다.<br><br><div>이 문서를 제대로 이해하고 활용하기 위해서는 Bash 스크립트 프로그래밍에 대한 지식을 가지고 있어야 한다. <a href="http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Development/Env/BeginningBashScript"><span style="COLOR: #3399cc">초보자를 위한 Bash 스크립트 프로그래밍</span></a>문서를 참고하기 바란다.<br><br><div>여기에서는 모든 유닉스에 기본적으로 제공된다고 생각되는 sh, <a href="http://www.joinc.co.kr/modules/moniwiki/wiki.php/manSearch?google=none&amp;name=tail"><span style="COLOR: #3399cc">tail</span></a>, tar를 통해서 Install Script를 만드는 방법에 대해서 알아보도록 하겠다.<br><br><div>당신이 mypackage-1.2.3.tgz이란 프로그램을 배포한다고 가정해보자. 당신은 실행하면, 여러가지 환경변수를 검사하고 유저의 입력을 받아서 자동으로 해당 디렉토리에 압축이 풀리는 스크립트를 만들기를 원할 것이다. 아래와 같은 방법으로 간단하게 만들 수 있다. <br><pre class="code">cat sfx-header mypackage-1.2.3.tgz &gt; mypackage-1.2.3.sh  </pre><br><div>핵심은 sfx-header인데, 다음과 같은 내용을 포함한다.<br><pre class="code">#!/bin/sh echo "" echo "MyPackage v99.99 - extracting archive... please wait" echo ""  # take the archive portion of this file and pipe it to tar # the NUMERIC parameter in this command should be one more # than the number of lines in this header file tail +12 $0 | tar xz  exit 0  </pre>tail +12 는 12번째 줄 부터 출력을 하라는 명령이다. 즉 mypackage-1.2.3.sh의 12번째줄 부터 출력을 해서 tar로 풀어라 이런 명령이 된다. 12번째 줄은 cat으로 가져다붙인 mypackage-1.2.3.tgz이 있으니, 최종적으로 현재 디렉토리에 mypackage-1.2.3.tgz의 압축을 풀게 된다. <br><br><div><h3><a id="s-3" name="s-3"></a>Advanced Install Script <a class="perma" href="http://www.joinc.co.kr/modules/moniwiki/wiki.php/Site/Tip/SelfExtractInstallScript?action=highlight&amp;value=Site#s-3"></a></h3><div>위의 Install Script는 별 문제 없이 돌아가지만, 본격적으로 사용하기에는 몇 가지 문제가 있다.<br><ol type="1"><li>tail로 출력한 라인수를 수동으로 계산해주어야 한다. 만약 sfx-header이 사용자에 의해서 수정된다거나 라인수를 잘못 입력했다하면, 제대로 작동하지 않게 된다. <br><li>현재 디렉토리에 압축이 풀리는데, 사용자가 원하는 디렉토리에 풀리도록 해야 할것이다. 사용자의 입력을 받아들일 수 있어야 할 것이다. <br><li>만약의 경우를 대비해서, 임시디렉토리에서 압축을 푸는 등의 관련작업을 한 다음, 성공했을 경우 지정된 디렉토리로 옮기도록 한다. <br><br></li></ol>다음은 위의 문제들을 해결하도록 수정된 스크립트다.<br><pre class="code">#!/bin/sh  DEFDIR="/usr/local" TEMPDIR="/tmp/myapp" WORKDIR=$PWD  clear echo "=====================================================" echo "ESM Package V1.0 - extracting archive ... please wait" echo "====================================================="  if [ $UID != 0 ]; then     echo "Your not Root !!"     exit 1 fi  echo -n "Install Directory ($DEFDIR): " read UDIR if [ "$UDIR" = "" ]; then     UDIR=$DEFDIR else     UDIR="$UDIR" fi  echo "Install Dir is $UDIR" test -d $UDIR if [  $? -eq 1 ]; then     mkdir $UDIR     if [ $? -ne 0 ];     then         echo "Directory Create failure : $UDIR"     fi fi   SKIP=`awk '/^__ARCHIVE_FOLLOWS__/ { print NR + 1; exit 0; }' $0`  mkdir $TEMPDIR cp $0 $TEMPDIR cd $TEMPDIR  tail +$SKIP $0 | tar x mv * $UDIR cd $WORKDIR  if [ $? -eq 0 ]; then     echo "======================================================="     echo " Program Install Success"     echo "=======================================================" else     echo "======================================================="     echo " Program Install Failure"     echo "=======================================================" fi exit 0  __ARCHIVE_FOLLOWS__  </pre>read 명령을 이용해서 프로그램이 설치될 경로를 사용자가 직접 입력할 수 있도록 했다. 만약 아무것도 입력하지 않는다면, 기본경로인 <strong>DEFDIR</strong>에 설치되도록 했다. 그다음 test 명령을 이용해서 사용자가 입력한 경로가 존재하는지를 확인하고, 존재하지 않는다면 <a href="http://www.joinc.co.kr/modules/moniwiki/wiki.php/manSearch?google=none&amp;name=mkdir"><span style="COLOR: #3399cc">mkdir</span></a>(1)로 해당 디렉토리를 설치하도록 한다. 자동으로 압축을 풀어야할 줄을 계산하기 위해서 <a href="http://www.joinc.co.kr/modules/moniwiki/wiki.php/manSearch?google=none&amp;name=awk"><span style="COLOR: #3399cc">awk</span></a>(1) 명령을 이용하고 있다. awk를 이용해서 <u>ARCHIVE_FOLLOWS</u>를 찾게하고, 이 문자열의 줄수를 얻어와서 tail로 넘기도록 했다. 마지막으로 임시디렉토리를 만든다음 설치파일을 복사하고, 압축을 푼다음, 풀린 파일을 설치 디렉토리로 이동하도록 한다. 모든 작업을 마친다음 원래 작업 경로로 이동하는 걸로 설치 스크립트가 끝난다. <br><br></div></div></div></div></div></div></div><br/><br/>tag : <a href="/tag/shell" rel="tag">shell</a>,&nbsp;<a href="/tag/unix" rel="tag">unix</a>,&nbsp;<a href="/tag/bash" rel="tag">bash</a>			 ]]> 
		</description>
		<category>O/S</category>
		<category>shell</category>
		<category>unix</category>
		<category>bash</category>

		<comments>http://euupsm.egloos.com/2242235#comments</comments>
		<pubDate>Sun, 22 Feb 2009 10:31:07 GMT</pubDate>
		<dc:creator>이유없음</dc:creator>
	</item>
</channel>
</rss>
