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

<channel>
	<title>Sybase数据库技术，数据库恢复专家 &#187; Unix&amp;Linux</title>
	<atom:link href="http://www.dbainfo.net/category/unix/feed" rel="self" type="application/rss+xml" />
	<link>https://www.dbainfo.net</link>
	<description>提供Sybase ASE及Sybase SQL Anywhere数据库修复服务，电话：13811580958(微信)，QQ：289965371！We have many years of experience in recovering data from damanged Sybase devices. Contact us by Phone: +86 13811580958 Wechat: 13811580958 Email: 289965371@qq.com</description>
	<lastBuildDate>Sat, 14 Jun 2025 16:28:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>linux上使用ext3grep恢复误删除的文件</title>
		<link>https://www.dbainfo.net/restore_delete_file_linux_ext3grep.htm</link>
		<comments>https://www.dbainfo.net/restore_delete_file_linux_ext3grep.htm#comments</comments>
		<pubDate>Wed, 02 Jul 2014 15:22:05 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[ext3grep]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/linux%e4%b8%8a%e4%bd%bf%e7%94%a8ext3grep%e6%81%a2%e5%a4%8d%e8%af%af%e5%88%a0%e9%99%a4%e7%9a%84%e6%96%87%e4%bb%b6.htm</guid>
		<description><![CDATA[误删除了ESQL文件：/data/ase157/OCS-15_0/sample/esqlc/readdevice.cp，此为背景。 本文介绍使用ext3grep恢复ext3类型分区上误删除文件的过程。 误删除文件readdevice.cp所在分区名为：/data。 &#160; 1、先安装ext3grep软件 wget http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gz&#160;&#160;&#160; 如果google无法下载的话，本站下载地址：https://www.dbainfo.net/wp-content/uploads/file/ext3grep-0.10.1.tar.gz。 tar zxvf ext3grep-0.10.1.tar.gz cd ext3grep-0.10.1 ./configure make make install 2、umount /data分区 执行：umount /data 如果提示busy，先kill正在使用这个目录的进程，再umount： fuser -k /data umount /data 因为/data上存在swapfile，无法成功umount /data 3、查询所有Inode，（执行需要几分钟～十多分钟） ext3grep /dev/xvdb1 --ls --inode 2 &#160; Inode 2 is directory &#34;&#34;. Directory block 1536: .-- File type in dir_entry (r=regular file, d=directory, l=symlink) &#124; .-- [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size:12px;"><span style="color: black; font-family: 微软雅黑;">误删除了ESQL文件：/data/ase157/OCS-15_0/sample/esqlc/readdevice.cp，此为背景。 </span></span></p>
<p><span style="font-size:12px;"><span style="color: black; font-family: 微软雅黑;">本文介绍使用ext3grep恢复ext3类型分区上误删除文件的过程。 </span></span></p>
<p><span style="font-size:12px;"><span style="color: black; font-family: 微软雅黑;">误删除文件readdevice.cp所在分区名为：/data。 </span></span></p>
<p>&nbsp;</p>
<p><span style="font-family:微软雅黑; font-size:12pt"><strong>1、先安装ext3grep软件 </strong></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">wget <a href="http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gz"><span style="color: blue; text-decoration: underline;">http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gz</span></a></span></span>&nbsp;&nbsp;&nbsp; 如果google无法下载的话，本站下载地址：<a href="https://www.dbainfo.net/wp-content/uploads/file/ext3grep-0.10.1.tar.gz" target="_blank">https://www.dbainfo.net/wp-content/uploads/file/ext3grep-0.10.1.tar.gz</a>。</p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">tar zxvf ext3grep-0.10.1.tar.gz </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">cd ext3grep-0.10.1 </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">./configure </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">make </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">make install </span></span></p>
<p><span id="more-2506"></span></p>
<p><span style="font-family:微软雅黑; font-size:12pt"><strong>2、umount /data分区 </strong></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">执行：<span style="font-size:14px;"><span style="color: rgb(0, 112, 192);">umount /data </span></span></span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">如果提示busy，先kill正在使用这个目录的进程，再umount： </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">fuser -k /data </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">umount /data </span></span></p>
<p><span style="font-size:12px;"><span style="color: red; font-family: 微软雅黑;">因为/data上存在swapfile，无法成功umount /data </span></span></p>
<p><span style="font-size:12px;"><br />
	</span></p>
<p><span style="font-family:微软雅黑; font-size:12pt"><strong>3、查询所有Inode，（执行需要几分钟～十多分钟） </strong></span></p>
<p><span style="color:#0070c0; font-family:微软雅黑; font-size:12pt">ext3grep /dev/xvdb1 --ls --inode 2 </span></p>
<p>&nbsp;</p>
<p><span style="font-family:微软雅黑; font-size:9pt">Inode 2 is directory &quot;&quot;. </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Directory block 1536: </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">.-- File type in dir_entry (r=regular file, d=directory, l=symlink) </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">| .-- D: Deleted ; R: Reallocated </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Indx Next | Inode | Deletion time Mode File name </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">==========+==========+----------------data-from-inode------+-----------+========= </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">0 1 d 2 drwxr-xr-x . </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">1 2 d 2 drwxr-xr-x .. </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">2 3 d 11 drwx------ lost+found </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">3 4 d 1840545 drwxr-xrwx www </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">4 5 d 846977 drwxr-x--- ase1503 </span></p>
<p><span style="color:red; font-family:微软雅黑; font-size:9pt">5 6 d <strong>1123873</strong> drwxrwxr-x ase157 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">6 7 d 1433345 drwxrwx--- download </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">7 8 r 48865 rrw-r--r-- swapfile </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">8 9 d 293185 drwxrwx--- sybasecncom </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">9 10 d 1254177 drwxr-xr-x sybiq127 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">10 11 d 1205318 drwxrwx--- db_dump </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">11 12 d 1824258 drwxr-xr-x syb64bit </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">12 14 d 2150017 drwxr-x--- tpch_test </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">14 16 d 1726577 drwxr-x--- rsync_backup </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">15 16 r 81448 D 1388112263 Fri Dec 27 10:44:23 2013 rrw-r--r-- dbainfo.net </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">16 end d 1693991 drwxr-xr-x sybcentral </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">18 20 r 48871 D 1379508179 Wed Sep 18 20:42:59 2013 rrw-r--r-- sybase-central4.3.rar </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">19 20 r 48870 D 1379508179 Wed Sep 18 20:42:59 2013 rrw-r--r-- Sybase ASE12.5附带的Sybase Central免安装版.part1.rar </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">21 end r 48872 D 1379508179 Wed Sep 18 20:42:59 2013 rrw-r--r-- Sybase ASE12.5附带的Sybase Central免安装版.part2.rar </span></p>
<p>&nbsp;</p>
<p><span style="font-family:微软雅黑; font-size:12pt"><strong>4、逐级查找Inode，看是否能找到readdevice.cp文件（此步骤也可省略） </strong></span></p>
<p><span style="color:#0070c0; font-family:微软雅黑; font-size:12pt">ext3grep /dev/xvdb1 --ls --inode 1123873 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Inode 1123873 is directory &quot;ase157&quot;. </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Directory block 2265088: </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">.-- File type in dir_entry (r=regular file, d=directory, l=symlink) </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">| .-- D: Deleted ; R: Reallocated </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Indx Next | Inode | Deletion time Mode File name </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">==========+==========+----------------data-from-inode------+-----------+========= </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">0 1 d 1123873 drwxrwxr-x . </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">1 2 d 2 drwxr-xr-x .. </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">2 3 d 1123874 drwxrwxr-x jConnect-7_0 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">3 4 d 1124105 drwxrwxr-x jutils-3_0 </span></p>
<p><span style="color:red; font-family:微软雅黑; font-size:9pt">4 5 d <strong>1124110</strong> drwxrwxr-x OCS-15_0 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">5 6 r 1124330 rrwxr-xr-x SYBASE.sh.save </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">6 7 r 1124331 rrwxrwxr-x .bash_history </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">7 8 d 1156557 drwxrwxr-x DataAccess </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">8 9 d 1156624 drwxrwxr-x DataAccess64 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">9 10 r 1140313 rrwxrwxr-x .viminfo </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">10 11 d 1172746 drwxrwxr-x Sybase_Install_Registry </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">11 12 d 1172748 drwxrwxr-x .fontconfig </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">12 13 d 1336433 drwxrwxr-x SCC-3_2 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">13 14 r 1124333 rrwxrwxr-x .bash_logout </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">14 15 d 1172992 drwxrwxr-x data </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">15 16 r 1124476 rrwxr-xr-x SYBASE.sh </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">16 17 r 1124335 rrwxrwxr-x .com.zerog.registry.xml </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">17 18 r 1124350 rrwxrwxr-x .bashrc </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">18 19 d 1172994 drwxrwxr-x jre32 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">19 20 d 1173016 drwxrwxr-x ASE-15_0 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">20 21 d 1156685 drwxrwxr-x SYBDIAG </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">21 22 r 1124337 rrwxr-xr-x SYBASE.csh.save </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">22 23 r 1124338 rrwxr-xr-x SYBASE.csh </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">23 24 d 1319467 drwxrwxr-x charsets </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">24 25 r 1124339 rrwxr-xr-x SYBASE.env.save </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">25 26 d 1320043 drwxrwxr-x .InstallAnywhere </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">26 27 r 1124340 rrwxrwxr-x .bash_profile </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">27 28 d 1320044 drwxrwxr-x .mozilla </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">28 29 d 1320045 drwxrwxr-x log </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">29 30 d 1320163 drwxrwxr-x collate </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">30 31 d 1320176 drwxrwxr-x SYSAM-2_0 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">31 32 d 1335663 drwxrwxr-x DBISQL </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">32 33 r 1124472 rrwxrwxr-x interfaces </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">33 34 d 1335698 drwxrwxr-x shared </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">34 35 d 1156693 drwxrwxr-x locales </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">35 36 d 1320219 drwxrwxr-x sybuninstall </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">36 37 r 1124342 rrw-r--r-- SYBASE.env </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">37 38 d 1156776 drwxrwxr-x config </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">38 39 d 1156781 drwxrwxr-x WS-15_0 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">39 40 d 1140280 drwxrwxr-x .sybase </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">40 41 r 1124332 rrwxrwxr-x interf.old </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">41 42 d 1156829 drwxrwxr-x .sqlanywhere11 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">42 43 r 1124344 rrw------- .lesshst </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">43 44 r 1108160 rrw-rw-r-x sybdiag-ase157xen-20130219175145.zip </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">44 46 d 1547361 drwxr-xr-x jre64 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">45 46 r 1124336 D 1392799959 Wed Feb 19 16:52:39 2014 rrw-r--r-- errorlog </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">46 47 r 1124341 rrwxr--r-- install.sh </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">47 48 r 1124381 rrw-rw-r-- sp_mda.sql </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">48 49 r 1124346 rrw-r--r-- accounts.zip </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">49 50 r 1124473 rrw-rw-r-- 123.txt </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">50 51 r 1124467 rrw-rw-r-- update_idx.sh </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">51 52 r 1124469 rrw-rw-r-- accounts.txt </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">52 53 d 1140283 drwxrwxr-x .java </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">53 55 r 1124470 rrw------- bulk_insert_sp110.log </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">55 end r 1124471 rrw-rw-r-- .jlogon11 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">56 end r 1140282 D 1392800192 Wed Feb 19 16:56:32 2014 rrwxrwxr-x .errorlog.swp </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">60 end r 1124479 D 1392456470 Sat Feb 15 17:27:50 2014 rrwxr-x--- .megaphone_telco_facts.sql.swp </span></p>
<p>&nbsp;</p>
<p><span style="color:#0070c0; font-family:微软雅黑; font-size:12pt">ext3grep /dev/xvdb1 --ls --inode 1124110 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Inode 1124110 is directory &quot;ase157/OCS-15_0&quot;. </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Directory block 2267769: </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">.-- File type in dir_entry (r=regular file, d=directory, l=symlink) </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">| .-- D: Deleted ; R: Reallocated </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Indx Next | Inode | Deletion time Mode File name </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">==========+==========+----------------data-from-inode------+-----------+========= </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">0 1 d 1124110 drwxrwxr-x . </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">1 2 d 1123873 drwxrwxr-x .. </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">2 3 d 1124111 drwxrwxr-x lib3p64 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">3 4 d 1124122 drwxrwxr-x python </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">4 5 d 1124133 drwxrwxr-x php </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">5 6 d 1124139 drwxrwxr-x xappdefaults </span></p>
<p><span style="color:red; font-family:微软雅黑; font-size:9pt">6 7 d <strong>1124142</strong> drwxrwxr-x sample </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">7 8 d 1124286 drwxrwxr-x include </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">8 9 d 1124305 drwxrwxr-x bin </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">9 10 d 1140161 drwxrwxr-x devlib </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">10 11 d 1156449 drwxrwxr-x scripts </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">11 12 d 1156452 drwxrwxr-x sybhelp </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">12 13 d 1156460 drwxrwxr-x lib </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">13 14 d 1156517 drwxrwxr-x config </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">14 15 d 1156526 drwxrwxr-x perl </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">15 end d 1156546 drwxrwxr-x lib3p </span></p>
<p>&nbsp;</p>
<p><span style="color:#0070c0; font-family:微软雅黑; font-size:12pt">ext3grep /dev/xvdb1 --ls --inode 1124142 </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Inode 1124142 is directory &quot;ase157/OCS-15_0/sample&quot;. </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Directory block 2269701: </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">.-- File type in dir_entry (r=regular file, d=directory, l=symlink) </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">| .-- D: Deleted ; R: Reallocated </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">Indx Next | Inode | Deletion time Mode File name </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">==========+==========+----------------data-from-inode------+-----------+========= </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">0 1 d 1124142 drwxrwxr-x . </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">1 2 d 1124110 drwxrwxr-x .. </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">2 3 d 1124143 drwxrwxr-x python </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">3 4 d 1124147 drwxrwxr-x php </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">4 5 d 1124150 drwxrwxr-x esqlcob </span></p>
<p><span style="color:red; font-family:微软雅黑; font-size:9pt">5 6 d <strong>1124161</strong> drwxrwxr-x esqlc </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">6 7 d 1124177 drwxrwxr-x ctlibrary </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">7 8 d 1124234 drwxrwxr-x db2ct </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">8 9 d 1124261 drwxrwxr-x perl </span></p>
<p><span style="font-family:微软雅黑; font-size:9pt">9 end d 1124264 drwxrwxr-x dblibrary<br />
	</span></p>
<p><span style="color:#0070c0; font-family:微软雅黑; font-size:12pt">ext3grep /dev/xvdb1 --ls --inode 1124161 </span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">Inode 1124161 is directory &quot;ase157/OCS-15_0/sample/esqlc&quot;. </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">Directory block 2269736: </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">.-- File type in dir_entry (r=regular file, d=directory, l=symlink) </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">| .-- D: Deleted ; R: Reallocated </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">Indx Next | Inode | Deletion time Mode File name </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">==========+==========+----------------data-from-inode------+-----------+========= </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">0 1 d 1124161 drwxrwxr-x . </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">1 2 d 1124142 drwxrwxr-x .. </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">2 3 r 1889427 rrw-r--r-- makefile </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">3 4 r 1124163 rrw-r--r-- exampleHA.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">4 6 r 1124164 rrw-r--r-- example6.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">6 7 r 1124166 rrw-r--r-- example8.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">7 8 r 1124167 rrw-r--r-- example7.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">8 9 r 1124168 rrw-r--r-- example5.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">9 10 r 1124169 rrw-r--r-- example2.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">10 11 r 1124170 rrwxr-xr-x sybopts.sh </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">11 12 r 1124171 rrw-r--r-- example4.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">12 13 r 1124172 rrw-r--r-- uni_example2.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">13 14 r 1124173 rrw-r--r-- exampleHA2.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">14 15 r 1124174 rrw-r--r-- example1.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">15 16 r 1124175 rrw-r--r-- uni_example1.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">16 18 r 1124480 rrw-r--r-- sybsqlex.h </span></span></p>
<p><span style="font-size:14px;"><span style="color: red; font-family: 微软雅黑;">17 18 r <strong>1889423</strong> D 1392800203 Wed <strong>Feb 19 16:56:43 2014</strong> rrw-rw-r-- readdevice.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">18 19 r 1124165 rrw-r--r-- ReadMe </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">19 21 r 1124478 rrw-rw-r-- config.h </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">20 21 r 1124162 D 1392800200 Wed Feb 19 16:56:40 2014 rrw-r--r-- readdevice.c </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">21 22 r 1889424 rrwxrwxr-x readdevice </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">22 end r 1124334 rrw-rw-r-- megaphone.readdevice.sql </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">23 end r 1889425 D 1392800192 Wed Feb 19 16:56:32 2014 rrw-r--r-- .makefile.swp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">24 end r 1889426 D 1392800192 Wed Feb 19 16:56:32 2014 rrw-r--r-- makefile~ </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">25 26 r 1258705 D 1392446019 Sat Feb 15 14:33:39 2014 rrwxrwxr-x example5 </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">26 28 r 1258706 D 1392446019 Sat Feb 15 14:33:39 2014 rrw-r--r-- example6.c </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">27 28 r 1258707 D 1392446019 Sat Feb 15 14:33:39 2014 rrwxrwxr-x example6 </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">28 30 r 1258708 D 1392446019 Sat Feb 15 14:33:39 2014 rrw-r--r-- example7.c </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">29 30 r 1258709 D 1392446019 Sat Feb 15 14:33:39 2014 rrwxrwxr-x example7 </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">30 32 r 1258710 D 1392446019 Sat Feb 15 14:33:39 2014 rrw-r--r-- example8.c </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">31 32 r 1258711 D 1392446019 Sat Feb 15 14:33:39 2014 rrwxrwxr-x example8 </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">32 34 r 1258712 D 1392446019 Sat Feb 15 14:33:39 2014 rrw-r--r-- exampleHA.c </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">33 34 r 1258713 D 1392446019 Sat Feb 15 14:33:39 2014 rrwxrwxr-x exampleHA </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">34 end r 1258714 D 1392446019 Sat Feb 15 14:33:39 2014 rrw-r--r-- exampleHA2.c </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">35 end r 1140282 D 1392800192 Wed Feb 19 16:56:32 2014 rrwxrwxr-x exampleHA2 </span></span></p>
<p>&nbsp;</p>
<p><span style="font-family:微软雅黑; font-size:12pt"><strong>　5、恢复/data/ase157/OCS-15_0/sample/esqlc/readdevice.cp文件 </strong></span></p>
<p><span style="color:#0070c0; font-family:微软雅黑; font-size:12pt">ext3grep /dev/xvdb1 --restore-file ase157/OCS-15_0/sample/esqlc/readdevice.cp </span></p>
<p style="text-align: center"><img alt="" src="https://www.dbainfo.net/wp-content/uploads/2014/07/070214_1522_linuxext3gr1.png" /><span style="font-family:微软雅黑; font-size:12pt"> </span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">如果提示以下信息，则表示恢复成功： </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">　　Restoring ase157/OCS-15_0/sample/esqlc/readdevice.cp </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">　　这时，执行ext3grep命令的当前目录下将会自动生成一个名为RESTORED_FILES的文件夹，文件夹下的ase157/OCS-15_0/sample/esqlc/readdevice.cp即为恢复的文件。查看了一下，和被删除前的内容一样，恢复完成！ </span></span></p>
<p>&nbsp;</p>
<p><span style="font-family:微软雅黑; font-size:12pt"><strong>　　6、重新mount /data分区： </strong></span></p>
<p><span style="font-size:14px;"><strong><span style="color: rgb(0, 112, 192); font-family: 微软雅黑;">mount /dev/xvdb1 /data </span></strong></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">因为第二步没有umount成功，不用再mount了。 </span></span></p>
<p><span style="font-size:12px;"><span style="font-family: 微软雅黑;">参考：<a href="http://zyan.cc/linux_ext3_undelete/" target="_blank">Linux EXT3文件系统下成功恢复误删的文件[原创] - 张宴的博客</a> </span></span></p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/restore_delete_file_linux_ext3grep.htm">https://www.dbainfo.net/restore_delete_file_linux_ext3grep.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/restore_delete_file_linux_ext3grep.htm">linux上使用ext3grep恢复误删除的文件</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">随机日志</h2><ul class="related_post"><li>2015-03-08 -- <a href="https://www.dbainfo.net/sap-pb-cr-number-5.htm" title="SAP PB Enterprise的所有已知BUG列表（5）">SAP PB Enterprise的所有已知BUG列表（5）</a> (0)</li><li>2009-12-10 -- <a href="https://www.dbainfo.net/sybase-ase15-shutdown-suspended.htm" title="遇到Sybase ASE15 shutdown无法进行的问题">遇到Sybase ASE15 shutdown无法进行的问题</a> (0)</li><li>2014-10-28 -- <a href="https://www.dbainfo.net/run-ase-on-inspur-k1-system.htm" title="Sybase支持浪潮天梭K1系统">Sybase支持浪潮天梭K1系统</a> (0)</li><li>2010-06-01 -- <a href="https://www.dbainfo.net/sybase-ase-isql-login-failed-feedbacks.htm" title="Sybase ASE中用isql连接数据库失败时的错误信息所反馈的信息">Sybase ASE中用isql连接数据库失败时的错误信息所反馈的信息</a> (0)</li><li>2009-11-18 -- <a href="https://www.dbainfo.net/extend-device-size-manually.htm" title="尝试手动增加sybase设备文件的内容来扩充设备大小">尝试手动增加sybase设备文件的内容来扩充设备大小</a> (0)</li><li>2010-05-31 -- <a href="https://www.dbainfo.net/ase-split-page-3ways-identity-setrowcount-temptable.htm" title="ASE中数据结果集分页功能的三种实现方法">ASE中数据结果集分页功能的三种实现方法</a> (0)</li><li>2011-11-01 -- <a href="https://www.dbainfo.net/connect-to-linux-by-xmanager.htm" title="配置xmanager连接linux问题">配置xmanager连接linux问题</a> (0)</li><li>2012-01-17 -- <a href="https://www.dbainfo.net/sqlserver-2005-failover-cluster2.htm" title="在VM Server中配置SQL Server 2005故障转移群集(2)&#8212;配置群集">在VM Server中配置SQL Server 2005故障转移群集(2)&#8212;配置群集</a> (0)</li><li>2015-03-08 -- <a href="https://www.dbainfo.net/sap-asa-cr-number-4.htm" title="SAP SQL Anywhere的所有已知BUG列表（4）">SAP SQL Anywhere的所有已知BUG列表（4）</a> (0)</li><li>2010-07-22 -- <a href="https://www.dbainfo.net/local-network-unable-ping-server.htm" title="局域网内不能ping通主机名问题的一个解决办法 ">局域网内不能ping通主机名问题的一个解决办法 </a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/restore_delete_file_linux_ext3grep.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>echo 命令的模式匹配字符功能</title>
		<link>https://www.dbainfo.net/unix-linux-echo-bracket-match-filename.htm</link>
		<comments>https://www.dbainfo.net/unix-linux-echo-bracket-match-filename.htm#comments</comments>
		<pubDate>Wed, 11 Apr 2012 13:28:57 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Unix&Linux]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=1910</guid>
		<description><![CDATA[要使用 echo 命令的模式匹配字符功能，可以输入： echo The back-up files are: *.bak 该用法将显示消息备份文件后跟有当前目录中以 .bak 结尾的文件名。 在正则表达式中，中括号[]是特殊字符，会匹配其中的任意一个字符且只是一个字符。 当想输出类似 [abc]这样的字符串时，最好使用双引号括起来。 echo &#34;[abc]&#34; 否则，如果直接使用echo [abc]输出，可能得到不同的&#8221;奇怪&#8220;的结果。 echo [abc]会在当前目录下，匹配名称为a或者b或者c的文件，如果当前目录包含a、b、c这三个文件中的任意一个，则返回相应的文件列表；否则返回 [abc]本身。 root@test:~# ls -l [abc] -rw-r--r-- 1 root root 0 Apr 11 17:27 a -rw-r--r-- 1 root root 0 Apr 11 17:34 b root@test:~# echo [abc] a b root@test:~# echo [cde] [cde] root@test:~# echo [...]]]></description>
			<content:encoded><![CDATA[<p>要使用 echo 命令的模式匹配字符功能，可以输入：<br />
	echo The back-up files are: *.bak<br />
	该用法将显示消息备份文件后跟有当前目录中以 .bak 结尾的文件名。</p>
<p>
	在正则表达式中，中括号[]是特殊字符，会匹配其中的任意一个字符且只是一个字符。</p>
<p>当想输出类似 [abc]这样的字符串时，最好使用双引号括起来。</p>
<p>echo &quot;[abc]&quot;</p>
<p>否则，如果直接使用echo [abc]输出，可能得到不同的&rdquo;奇怪&ldquo;的结果。</p>
<p>echo [abc]会在当前目录下，匹配名称为a或者b或者c的文件，如果当前目录包含a、b、c这三个文件中的任意一个，则返回相应的文件列表；否则返回 [abc]本身。</p>
<blockquote><p>root@test:~# <span style="color:#f00;"><strong>ls -l [abc]</strong></span><br />
	-rw-r--r-- 1 root root 0 Apr 11 17:27 a<br />
	-rw-r--r-- 1 root root 0 Apr 11 17:34 b<br />
	root@test:~# <span style="color:#f00;"><strong>echo [abc]</strong></span><br />
	a b<br />
	root@test:~# <span style="color:#f00;"><strong>echo [cde]</strong></span><br />
	[cde]<br />
	root@test:~# <span style="color:#f00;"><strong>echo *.sh</strong></span><br />
	openvpn.sh setup-debian.sh<br />
	root@test:~#</p></blockquote>
<p>在使用echo输出字符串的时候，如果不加双引号，会启用模式匹配功能；如果恰好能匹配到当前目录下的文件，则会输出匹配到的文件名列表。</p>
<p>如果没有匹配到文件的话， 会直接打印相应的字符串。</p>
<p>为了防止不确定的输出结果， 可以将字符串两边添加双引号。 为了中括号的问题去改造以前的代码是个比较大的工程。</p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/unix-linux-echo-bracket-match-filename.htm">https://www.dbainfo.net/unix-linux-echo-bracket-match-filename.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/unix-linux-echo-bracket-match-filename.htm">echo 命令的模式匹配字符功能</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">随机日志</h2><ul class="related_post"><li>2011-01-28 -- <a href="https://www.dbainfo.net/happy_new_year_2011.htm" title="新春快乐">新春快乐</a> (1)</li><li>2015-03-08 -- <a href="https://www.dbainfo.net/sap-pb-cr-number-5.htm" title="SAP PB Enterprise的所有已知BUG列表（5）">SAP PB Enterprise的所有已知BUG列表（5）</a> (0)</li><li>2010-11-10 -- <a href="https://www.dbainfo.net/post-wordpress-by-word2007-quickly.htm" title="用Word2007来发布WordPress博客">用Word2007来发布WordPress博客</a> (2)</li><li>2013-04-02 -- <a href="https://www.dbainfo.net/ase-lob-text-image-usage.htm" title="ASE中对于大文本字段的使用方法">ASE中对于大文本字段的使用方法</a> (0)</li><li>2010-08-29 -- <a href="https://www.dbainfo.net/access-sqlserver-from-oracle-by-transgate.htm" title="从oracle内访问sqlserver2005的数据时一个错误">从oracle内访问sqlserver2005的数据时一个错误</a> (0)</li><li>2009-04-05 -- <a href="https://www.dbainfo.net/sybase-telephone-interview-experience.htm" title="Sybase电话面试经验">Sybase电话面试经验</a> (0)</li><li>2009-11-18 -- <a href="https://www.dbainfo.net/sybase-ase-recovery-tool.htm" title="Sybase Adaptive Server Enterprise(ASE)数据库恢复工具">Sybase Adaptive Server Enterprise(ASE)数据库恢复工具</a> (2)</li><li>2010-02-25 -- <a href="https://www.dbainfo.net/how-sql-server-read-from-datafile-pages.htm" title="SQL SERVER 如何读取页面上的数据">SQL SERVER 如何读取页面上的数据</a> (0)</li><li>2010-09-15 -- <a href="https://www.dbainfo.net/sql-server-database-all-tables-space-order-desc.htm" title="统计SQL SERVER数据库内所有表占用空间并排序">统计SQL SERVER数据库内所有表占用空间并排序</a> (0)</li><li>2009-12-14 -- <a href="https://www.dbainfo.net/maser-db-timestamp-inconsistent.htm" title="sybase启动报master时间戳不一致的问题">sybase启动报master时间戳不一致的问题</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/unix-linux-echo-bracket-match-filename.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>oracle11g报TNS-12537和ORA-609问题的解决</title>
		<link>https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm</link>
		<comments>https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm#comments</comments>
		<pubDate>Thu, 01 Dec 2011 06:22:01 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=1294</guid>
		<description><![CDATA[在CentOS5.5 x86_64上安装了Oracle11g，版本号为：11.2.0.1.0 但是，在其它客户端上使用sqlplus连接的时候需要等待很长时间才能连接上，有时候报超时的错误。 错误信息为： *********************************************************************** Fatal NI connect error 12537, connecting to: (LOCAL=NO) VERSION INFORMATION: TNS for Linux: Version 11.2.0.1.0 - Production Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production Time: 30-NOV-2011 14:28:10 Tracing not turned on. Tns error struct: ns main [...]]]></description>
			<content:encoded><![CDATA[<p>在CentOS5.5 x86_64上安装了Oracle11g，版本号为：11.2.0.1.0</p>
<p>但是，在其它客户端上使用sqlplus连接的时候需要等待很长时间才能连接上，有时候报超时的错误。</p>
<p>错误信息为：</p>
<pre>***********************************************************************

Fatal NI connect error 12537, connecting to:
 (LOCAL=NO)

  VERSION INFORMATION:
        TNS for Linux: Version 11.2.0.1.0 - Production
        Oracle Bequeath NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
        TCP/IP NT Protocol Adapter for Linux: Version 11.2.0.1.0 - Production
  Time: 30-NOV-2011 14:28:10
  Tracing not turned on.
  Tns error struct:
    ns main err code: 12537

TNS-12537: TNS:connection closed
    ns secondary err code: 12560
    nt main err code: 0
    nt secondary err code: 0
    nt OS err code: 0
opiodr aborting process unknown ospid (29666) as a result of ORA-609
Wed Nov 30 14:36:24 2011
</pre>
<p><strong>Oracle11g服务器数据库名为：lzf，全局名称为：lzf.dbainfo.net</strong><span id="more-1294"></span></p>
<p><strong>监听listener.ora配置文件内容为：</strong><br />
	[oracle@centos5 lzf]$ cat /u01/oracle/product/11.2/network/admin/listener.ora <br />
	# listener.ora Network Configuration File: /u01/oracle/product/11.2/network/admin/listener.ora<br />
	# Generated by Oracle configuration tools.</p>
<p>	LISTENER =<br />
	&nbsp; (DESCRIPTION_LIST =<br />
	&nbsp;&nbsp;&nbsp; (DESCRIPTION =<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (ADDRESS = (PROTOCOL = TCP)(HOST = <span style="font-size:14px;">centos5.5</span>)(PORT = 1521))<br />
	&nbsp;&nbsp;&nbsp; )<br />
	&nbsp; )</p>
<p>	ADR_BASE_LISTENER = /u01/oracle</p>
<p><strong>服务名称配置文件tnsnames.ora 内容为：</strong></p>
<p>[oracle@centos5 lzf]$ cat /u01/oracle/product/11.2/network/admin/tnsnames.ora <br />
	# tnsnames.ora Network Configuration File: /u01/oracle/product/11.2/network/admin/tnsnames.ora<br />
	# Generated by Oracle configuration tools.</p>
<p>	LZF =<br />
	&nbsp; (DESCRIPTION =<br />
	&nbsp;&nbsp;&nbsp; (ADDRESS = (PROTOCOL = TCP)(HOST = <span style="font-size:14px;">centos5.5</span>)(PORT = 1521))<br />
	&nbsp;&nbsp;&nbsp; (CONNECT_DATA =<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (SERVER = DEDICATED)<br />
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (SERVICE_NAME = lzf.dbainfo.net)<br />
	&nbsp;&nbsp;&nbsp; )<br />
	&nbsp; )</p>
<p><span style="font-size:14px;"><strong>解决方法：<br />
	</strong></span></p>
<p>将/etc/resolv.conf配置文件中的nameserver注释。</p>
<pre>[root@centos5 ~]# cat /etc/resolv.conf
search domain.org
<span style="font-size:14px;">#nameserver 192.168.1.1
#nameserver 8.8.8.8</span>
</pre>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm">https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm">oracle11g报TNS-12537和ORA-609问题的解决</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011-12-01 -- <a href="https://www.dbainfo.net/linux-date-count-days-of-month.htm" title="linux使用date计算某个月份的天数">linux使用date计算某个月份的天数</a> (0)</li><li>2011-10-14 -- <a href="https://www.dbainfo.net/history-of-common-databases.htm" title="各数据库的发展历史">各数据库的发展历史</a> (0)</li><li>2011-04-28 -- <a href="https://www.dbainfo.net/oracle-10g-installation-libstdc-all_no_orclihsodbc.htm" title="oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决">oracle10g安装过程中Error in invoking target ‘all_no_orcl ihsodbc’ of makefile问题的解决</a> (0)</li><li>2010-12-23 -- <a href="https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm" title="从sybase向oracle导入时间类型的数据">从sybase向oracle导入时间类型的数据</a> (0)</li><li>2010-12-15 -- <a href="https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm" title="Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm">Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm</a> (0)</li><li>2010-11-25 -- <a href="https://www.dbainfo.net/cross-platform-migrate-device-file-from-linux-to-windows.htm" title="平台数据库迁移linux >windows">平台数据库迁移linux >windows</a> (0)</li><li>2010-10-22 -- <a href="https://www.dbainfo.net/oracle-view-table-physical-storage-size.htm" title="查看Oracle中表所有字段的字节总长度">查看Oracle中表所有字段的字节总长度</a> (0)</li><li>2010-09-28 -- <a href="https://www.dbainfo.net/view-table-column-properties-ddl.htm" title="查看表中列属性的SQL语句">查看表中列属性的SQL语句</a> (0)</li><li>2010-09-17 -- <a href="https://www.dbainfo.net/java-connect-url-for-oracle-db2-sql-sybase-informix-mysql-pgsql.htm" title="java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL">java连接数据库Oracle,DB2,SQL Server,Sybase,Informix,MySQL,PostgreSQL</a> (0)</li><li>2010-09-09 -- <a href="https://www.dbainfo.net/solaris-remote-ssh-permitrootlogin.htm" title="如何用ROOT用户通过SSH连接到SOLARIS">如何用ROOT用户通过SSH连接到SOLARIS</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>linux使用date计算某个月份的天数</title>
		<link>https://www.dbainfo.net/linux-date-count-days-of-month.htm</link>
		<comments>https://www.dbainfo.net/linux-date-count-days-of-month.htm#comments</comments>
		<pubDate>Thu, 01 Dec 2011 05:07:10 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=1289</guid>
		<description><![CDATA[本博客中aix系统可以用改变时区的方法获取前后N天的日期 Linux下使用date计算某个月份的天数： Month=2 Year=2008 nextmonth=`date -d &#34;1 month $Year-$Month-&#34;01&#34;&#34; +%Y-%m-%d` date -d &#34;-1 day $nextmonth&#34; +%d #或者将-d &#34;1 month $Year-$Month-&#34;01&#34;&#34; 和 date -d &#34;-1 day $nextmonth&#34; 写在一行命令中 Month=2 Year=2008 date -d &#34;1 month $Year-$Month-&#34;01&#34;&#34; -d &#34;-1 day&#34; +%d 使用cal 计算某个月份的天数： Month=2 Year=2008 cal $Month $Year &#124; sed -n &#39;3,$p&#39; &#124; xargs &#124; awk &#39;{print $NF}&#39; [...]]]></description>
			<content:encoded><![CDATA[<p>本博客中<a href="https://www.dbainfo.net/aix-date-change-time-zone-to-get-date.htm" target="_blank">aix系统可以用改变时区的方法获取前后N天的日期</a></p>
<p>Linux下使用date计算某个月份的天数：</p>
<pre>Month=2
Year=2008
nextmonth=`date -d &quot;1 month $Year-$Month-&quot;01&quot;&quot;  +%Y-%m-%d`
date -d &quot;-1 day $nextmonth&quot; +%d
#或者将-d &quot;1 month $Year-$Month-&quot;01&quot;&quot; 和 date -d &quot;-1 day $nextmonth&quot; 写在一行命令中
Month=2
Year=2008
date -d &quot;1 month $Year-$Month-&quot;01&quot;&quot; -d &quot;-1 day&quot; +%d
</pre>
<p>使用cal 计算某个月份的天数：<span id="more-1289"></span></p>
<pre>Month=2
Year=2008
cal $Month $Year | sed -n &#39;3,$p&#39; | xargs | awk &#39;{print $NF}&#39;
</pre>
<p>计算当月的天数：</p>
<pre>date -d &#39;1 month &#39; -d  &#39;1 days ago&#39; +%d
#或者
cal | sed -n &#39;3,$p&#39; | xargs | awk &#39;{print $NF}&#39;</pre>
<hr />
<p>由于Linux对man date -d 参数说的比较模糊,故举例如下:<br />
	# -d, --date=STRING&nbsp; display time described by STRING, not `now&#39;</p>
<p>参数-d，计算前一天可以使用：last-day,yesterday或者-1days</p>
<pre>sh-3.2# <strong>date -d last-day +%Y%m%d</strong>
20111130
sh-3.2# <strong>date -d yesterday +%Y%m%d</strong>
20111130
sh-3.2# <strong>date -d -1days +%Y%m%d</strong>
20111130</pre>
<p>相应的，计算后一天可以使用：next-day,tomorrow,1days</p>
<pre>date -d next-day +%Y%m%d
date -d tomorrow +%Y%m%d
date -d 1days +%Y%m%d</pre>
<p>其它日期值还有：<strong>last-month,next-month,next-year,last-year&nbsp;</strong></p>
<p>下面四种形式是一样的：</p>
<pre>date -d -1days +%Y%m%d
date -d -1day +%Y%m%d
date -d &#39;1 day ago&#39; +%Y%m%d
date -d &#39;1 days ago&#39; +%Y%m%d</pre>
<p>其它日期分量还有：month,year,hour,minute,second</p>
<pre>date -d 1month +%Y%m%d
date -d -2year +%Y%m%d
date -d -2hours +&quot;%Y%m%d %H:%M:%S&quot;
date -d 60minutes +&quot;%Y%m%d %H:%M:%S&quot;
date -d 3600seconds +&quot;%Y%m%d %H:%M:%S&quot;</pre>
<p>表示今年的11月11日：</p>
<pre>date -d 11nov +%Y%m%d
date -d &#39;Nov 11&#39; +%Y%m%d</pre>
<p>表示2011年12月12日：</p>
<pre>date -d 12dec12  +%Y%m%d
date -d 12dec2012  +%Y%m%d
date -d &#39;12 dec 2012&#39; +%Y%m%d
date -d &#39;dec 12 2012&#39; +%Y%m%d</pre>
<p>查看文件的访问时间、修改时间等信息：stat</p>
<p>如： stat interfaces</p>
<p>输出中包括：文件大小、Inode号、权限、访问时间、修改时间等。</p>
<p>关于ls输出中的时间显示问题：默认ls -l输出的时间以locale形式显示文件的修改时间。以指定格式：&quot;%Y-%m-%d %H:%M:%S&quot; 显示文件的上次访问时间：</p>
<p>sybase@centos5 ~]$ <strong>ls -l --time=atime --time-style=+&quot;%F %T&quot; interfaces</strong><br />
	-rwxr-xr-x 1 sybase sybase 1715 <span style="color:#00f;">2014-12-09 21:33:41</span> interfaces<br />
	[sybase@centos5 ~]$ <strong>stat interfaces</strong><br />
	&nbsp; File: `interfaces&#39;<br />
	&nbsp; Size: 1715&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Blocks: 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IO Block: 4096&nbsp;&nbsp; regular file<br />
	Device: fd00h/64768d&nbsp;&nbsp;&nbsp; Inode: 21049252&nbsp;&nbsp;&nbsp; Links: 1<br />
	Access: (0755/-rwxr-xr-x)&nbsp; Uid: (&nbsp; 500/&nbsp; sybase)&nbsp;&nbsp; Gid: (&nbsp; 500/&nbsp; sybase)<br />
	Access: <span style="color:#00f;">2014-12-09 21:33:41</span>.000000000 +0800<br />
	Modify: <span style="color:#f00;">2012-06-30 13:13:16.000000000</span> +0800<br />
	Change: 2012-06-30 13:13:16.000000000 +0800<br />
	[sybase@centos5 ~]$<strong> ls -l --time-style=full-iso interfaces</strong><br />
	-rwxr-xr-x 1 sybase sybase 1715 <span style="color:#f00;">2012-06-30 13:13:16.000000000</span> +0800 interfaces</p>
<p>另外一个问题：判断某年的天数，也就是说某年是否闰年？</p>
<p>Year=$(date +%Y)<br />
	if [ $(expr $Year % 400) -eq 0 ] || [ $(expr $Year % 4) -eq 0&nbsp; -a&nbsp; $(expr $Year % 100) -ne 0 ]; then<br />
	&nbsp;&nbsp;&nbsp; echo &quot;$Year has: 366 days&quot;<br />
	else<br />
	&nbsp;&nbsp;&nbsp; echo &quot;$Year has: 365 days&quot;<br />
	fi</p>
<p>参考：<a href="http://blog.chinaunix.net/space.php?uid=9370128&amp;do=blog&amp;id=271932" target="_blank">linux date -d参数用法</a></p>
<p><a href="http://hi.baidu.com/ethnicitybeta/blog/item/bb0d5f3289d108240b55a94e.html" target="_blank">linux date的参数 <br />
	</a></p>
<p><a href="http://hi.baidu.com/lipeng_tsinghua/blog/item/2d2e07d8e517223533fa1c2a.html" target="_blank">Linux date 命令使用技巧<br />
	</a></p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/linux-date-count-days-of-month.htm">https://www.dbainfo.net/linux-date-count-days-of-month.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/linux-date-count-days-of-month.htm">linux使用date计算某个月份的天数</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011-12-01 -- <a href="https://www.dbainfo.net/oracle11g-tns-12537-and-ora-609-troubleshooting.htm" title="oracle11g报TNS-12537和ORA-609问题的解决">oracle11g报TNS-12537和ORA-609问题的解决</a> (0)</li><li>2011-06-02 -- <a href="https://www.dbainfo.net/aix-date-change-time-zone-to-get-date.htm" title="aix系统可以用改变时区的方法获取前后N天的日期">aix系统可以用改变时区的方法获取前后N天的日期</a> (0)</li><li>2010-12-23 -- <a href="https://www.dbainfo.net/import-datetime-date-to-oracle-from-sybase-ase.htm" title="从sybase向oracle导入时间类型的数据">从sybase向oracle导入时间类型的数据</a> (0)</li><li>2010-12-15 -- <a href="https://www.dbainfo.net/windows-cmd-bat-extract-date-time-format.htm" title="windows cmd下的date，time格式的提取">windows cmd下的date，time格式的提取</a> (0)</li><li>2010-12-15 -- <a href="https://www.dbainfo.net/oracle10g-linux5_4-installer-libxp.htm" title="Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm">Linux 5下安装oracle开始遇见的错误 缺少包libXp-1.0.0-8.i386.rpm</a> (0)</li><li>2010-11-25 -- <a href="https://www.dbainfo.net/cross-platform-migrate-device-file-from-linux-to-windows.htm" title="平台数据库迁移linux >windows">平台数据库迁移linux >windows</a> (0)</li><li>2010-11-09 -- <a href="https://www.dbainfo.net/sybase-ase-current-date-last_day.htm" title="Sybase ASE v15.x中查询本月最后一天的日期的3种实现方法">Sybase ASE v15.x中查询本月最后一天的日期的3种实现方法</a> (0)</li><li>2010-09-09 -- <a href="https://www.dbainfo.net/solaris-remote-ssh-permitrootlogin.htm" title="如何用ROOT用户通过SSH连接到SOLARIS">如何用ROOT用户通过SSH连接到SOLARIS</a> (0)</li><li>2010-08-16 -- <a href="https://www.dbainfo.net/linux-mount-cdrom.htm" title="linux下光盘的挂载使用">linux下光盘的挂载使用</a> (2)</li><li>2009-12-18 -- <a href="https://www.dbainfo.net/install-sybase-at-linux5-4el.htm" title="在linux5.4enterprise下安装sybase成功">在linux5.4enterprise下安装sybase成功</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/linux-date-count-days-of-month.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>centos 5.5 vnc server配置方法</title>
		<link>https://www.dbainfo.net/config-vn-cserver-on-centos5-5.htm</link>
		<comments>https://www.dbainfo.net/config-vn-cserver-on-centos5-5.htm#comments</comments>
		<pubDate>Thu, 03 Nov 2011 14:21:50 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[VNC]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=1249</guid>
		<description><![CDATA[1.安装所需要的包 所需的包有vnc-server(vnc服务器软件包）,vnc（客户端包）。 另外，既然想用VNC，肯定是想要看图形界面，那就还要安装&#34;GNOME Desktop Environment&#34;(如果是想用GNOME,否则用KDE） 如下： #yum install vnc-server(注意在root下安装） #yum install vnc #yum groupinstall &#34;GNOME Desktop Environment&#34; 注意安装前先用rpm -qa&#124;grep &#34;vnc-server&#34;这种方式来查询一下是否已经安装好。一般如果你安装centos时选用的是默认的方式安装系统，那上面的步骤可以省略。 2.准备VNC用户资料，包括创建你想要的用户和密码（就是系统自己那种用户密码）。 如： #useradd peter #passwd peter 如果系统所需帐号已经建立，或是你只想用root来登录VNCServer，那此步骤也可以略过。 3.设定你想用来登录的用户的VNC密码。注意这里并不是系统帐号密码，而是用来登录VNC的密码。可以与系统的密码一样，也可以不一样。 方法是：先进入相应的帐号，比如在终端下进入peter用户，然后输入vncpasswd命令 peter$ vncpasswd (在这里输入你要的密码，确定）（其它帐号方法同样） 这时候，可以进入家目录下的.vnc目录下来查看是否产生了passwd文件，如果有，说明密码创建成功。 【～】$cd .vnc [~}$ls passwd 查看文件内容时并不能看到密码资料，因为是加密的。 4.修改VNC服务器配置文件/etc/sysconfig/vncservers 里面所有内容都是注释行，所以你可以直接在后面加上下面的语句： VNCSERVERS=&#34;1:peter 2:root&#34; VNCSERVERARGS[1]=&#34;-geometry 800x600&#34; VNCSERVERARGS[2]=&#34;-geometry 1024x768&#34; 这里要注意两点，第一、上面三行中第一行是设定可以使用VNC服务器的帐号，可以设定多个，但中间要用空格隔开。注意前面的数字&#8220;1&#8221;或是&#8220;2&#8221;，当你要从其它电脑来VNC服务器时，就需要用IP:1这种方法，而不能直接用 IP。如假定你的VNC服务器IP是192.168.1.100，那想进入VNC服务器，并以peter用户登录时，需要在vncviewer里输入IP的地方输入：192.168.1.100:1,如果是root,那就是192.168.1.100:2. 第二、下面两行[1][2]最好与上面那个相对应，后面的800X600可以换成你电脑支持的分辨率。注意中间的&#34;x&#34;不是&#8220;*&#8221;，而是小写字母&#34;x&#34;. 5.创建xstartup scripts。 只要你启用一次VNCserver，就能自动创建，方法如下： #/sbin/service vncserver start(注意要在root下才能启动） [...]]]></description>
			<content:encoded><![CDATA[<p>1.安装所需要的包<br />
	所需的包有vnc-server(vnc服务器软件包）,vnc（客户端包）。<br />
	另外，既然想用VNC，肯定是想要看图形界面，那就还要安装&quot;GNOME Desktop Environment&quot;(如果是想用GNOME,否则用KDE）<br />
	如下：</p>
<pre>#yum install vnc-server(注意在root下安装）
#yum install vnc
#yum groupinstall &quot;GNOME Desktop Environment&quot;
</pre>
<p>注意安装前先用rpm -qa|grep &quot;vnc-server&quot;这种方式来查询一下是否已经安装好。一般如果你安装centos时选用的是默认的方式安装系统，那上面的步骤可以省略。</p>
<p>2.准备VNC用户资料，包括创建你想要的用户和密码（就是系统自己那种用户密码）。<br />
	如：<br />
	#useradd peter<br />
	#passwd peter<br />
	如果系统所需帐号已经建立，或是你只想用root来登录VNCServer，那此步骤也可以略过。<span id="more-1249"></span></p>
<p>3.设定你想用来登录的用户的VNC密码。注意这里并不是系统帐号密码，而是用来登录VNC的密码。可以与系统的密码一样，也可以不一样。<br />
	方法是：先进入相应的帐号，比如在终端下进入peter用户，然后输入vncpasswd命令<br />
	peter$ vncpasswd<br />
	(在这里输入你要的密码，确定）（其它帐号方法同样）<br />
	这时候，可以进入家目录下的.vnc目录下来查看是否产生了passwd文件，如果有，说明密码创建成功。<br />
	【～】$cd .vnc<br />
	[~}$ls<br />
	passwd<br />
	查看文件内容时并不能看到密码资料，因为是加密的。</p>
<p>4.修改VNC服务器配置文件/etc/sysconfig/vncservers<br />
	里面所有内容都是注释行，所以你可以直接在后面加上下面的语句：</p>
<pre>VNCSERVERS=&quot;1:peter 2:root&quot;
VNCSERVERARGS[1]=&quot;-geometry 800x600&quot;
VNCSERVERARGS[2]=&quot;-geometry 1024x768&quot;
</pre>
<p>这里要注意两点，第一、上面三行中第一行是设定可以使用VNC服务器的帐号，可以设定多个，但中间要用空格隔开。注意前面的数字&ldquo;1&rdquo;或是&ldquo;2&rdquo;，当你要从其它电脑来VNC服务器时，就需要用IP:1这种方法，而不能直接用</p>
<p>IP。如假定你的VNC服务器IP是192.168.1.100，那想进入VNC服务器，并以peter用户登录时，需要在vncviewer里输入IP的地方输入：192.168.1.100:1,如果是root,那就是192.168.1.100:2.<br />
	第二、下面两行[1][2]最好与上面那个相对应，后面的800X600可以换成你电脑支持的分辨率。注意中间的&quot;x&quot;不是&ldquo;*&rdquo;，而是小写字母&quot;x&quot;.</p>
<p>5.创建xstartup scripts。<br />
	只要你启用一次VNCserver，就能自动创建，方法如下：<br />
	#/sbin/service vncserver start(注意要在root下才能启动）<br />
	#/sbin/service vncserver stop(启动后再关闭，方便下面的操作）<br />
	通过上面的方法，就可以在用户家目录下的.vnc目录里创建xstartup文件.</p>
<pre>6.修改xstartup文件。
原本的xstartup文件内容应该如下：
#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] &amp;&amp; exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] &amp;&amp; xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &amp;
xterm -geometry 80x24+10+10 -ls -title &quot;$VNCDESKTOP Desktop&quot; &amp;
twm &amp;</pre>
<pre>只要取消上面第三行第四行前的#符号，就行，当然，如果你想进入VNC服务器时看到的是图形界面，那就还需要把最后面的那行注释掉，并加上gnome-session $.
修改后的文件内容应该如下：
#!/bin/sh
# Add the following line to ensure you always have an xterm available.
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] &amp;&amp; exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] &amp;&amp; xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &amp;
xterm -geometry 80x24+10+10 -ls -title &quot;$VNCDESKTOP Desktop&quot; &amp;
#twm &amp;
gnome-session &amp;</pre>
<p>上面的步骤做完，VNC服务器基本上就配置完了，接下来要做的是用root登录进去，然后，用&quot;service vncserver start&quot;命令启动vncserver，这时候你再用&quot;netstat -tunlp&quot;命令来查看它启用的端口，可以发现有5801，5901，6001。都是TCP端口，另外如果你如我设置，那就还会有5802，5902，6002这些端口也是它的。</p>
<p>接下来，是给它开防火墙端口放行。把5801这些端口都加入进去。一般来说，直接在图形界面上加端口会更方便。点&ldquo;系统-管理-安全级别与防火墙&rdquo;在里面加入上面的端口号就行了。</p>
<p>做到这里，总算是大功告成了，接下来你可以用http://IP:port的方式来WEB登录比如说</p>
<p>http://IP:5801,也可以在vncviewer里用IP:1这种来登录。</p>
<hr />
<p>转自：<a href="http://blog.doulexiang.com/" target="_blank">苏北小三/开源技术BLOG</a> -&nbsp; <a href="http://blog.doulexiang.com/notes/centos-55-vnc-server%E9%85%8D%E7%BD%AE%E6%96%B9%E6%B3%95" target="_blank">http://blog.doulexiang.com/notes/centos-55-vnc-server%E9%85%8D%E7%BD%AE%E6%96%B9%E6%B3%95</a></p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/config-vn-cserver-on-centos5-5.htm">https://www.dbainfo.net/config-vn-cserver-on-centos5-5.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/config-vn-cserver-on-centos5-5.htm">centos 5.5 vnc server配置方法</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">相关文章</h2><ul class="related_post"><li>2011-10-14 -- <a href="https://www.dbainfo.net/install-centos-6-0-from-pxe-hangggg.htm" title="解决通过网络(PXE)安装CentOS6.0 x86_64时无法初始化硬件的问题">解决通过网络(PXE)安装CentOS6.0 x86_64时无法初始化硬件的问题</a> (0)</li><li>2009-12-28 -- <a href="https://www.dbainfo.net/vnc-from-windows-to-remote-linxu-desktop.htm" title="用vnc实现windows远程连接linux桌面">用vnc实现windows远程连接linux桌面</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/config-vn-cserver-on-centos5-5.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>显示dd命令的进度</title>
		<link>https://www.dbainfo.net/show-progress-of-dd-command.htm</link>
		<comments>https://www.dbainfo.net/show-progress-of-dd-command.htm#comments</comments>
		<pubDate>Wed, 02 Nov 2011 14:26:20 +0000</pubDate>
		<dc:creator>dbainfo</dc:creator>
				<category><![CDATA[Unix&Linux]]></category>
		<category><![CDATA[dd]]></category>

		<guid isPermaLink="false">http://www.dbainfo.net/?p=1240</guid>
		<description><![CDATA[linux下显示dd命令的进度： dd if=/dev/zero of=/tmp/zero.img bs=10M count=100000 想要查看上面的dd命令的执行进度，可以使用下面几种方法： 比如：每5秒输出dd的进度 方法一： watch -n 5 pkill -USR1 ^dd$ 方法二： watch -n 5 killall -USR1 dd 方法三： while killall -USR1 dd; do sleep 5; done 方法四： while (ps auxww &#124;grep &#34; dd &#34; &#124;grep -v grep &#124;awk &#39;{print $2}&#39; &#124;while read pid; do kill -USR1 $pid; done) ; do [...]]]></description>
			<content:encoded><![CDATA[<p>linux下显示dd命令的进度：</p>
<pre>dd if=/dev/zero of=/tmp/zero.img bs=10M count=100000
</pre>
<p>想要查看上面的dd命令的执行进度，可以使用下面几种方法：</p>
<p>比如：每5秒输出dd的进度</p>
<p><strong>方法一：<br />
	</strong></p>
<pre>watch -n 5 pkill -USR1 ^dd$</pre>
<p><strong>方法二：</strong></p>
<pre>watch -n 5 killall -USR1 dd</pre>
<p><strong>方法三：</strong></p>
<pre>while killall -USR1 dd; do sleep 5; done</pre>
<p><strong>方法四：</strong></p>
<pre>while (ps auxww |grep &quot; dd &quot; |grep -v grep |awk &#39;{print $2}&#39; |while read pid; do kill -USR1 $pid; done) ; do sleep 5; done</pre>
<p>上述四种方法中使用三个命令：pkill、killall、kill向dd命令发送SIGUSR1信息，dd命令进程接收到信号之后就打印出自己当前的进度。</p>
<hr />
<p>参考：<a href="http://www.dbabeta.com/" target="_blank">贝塔中的DBA</a> - <a href="http://www.dbabeta.com/2009/dd-progress.html" target="_blank">查看dd命令的执行进度</a></p>
<p><a href="http://www.commandlinefu.com/" target="_blank">commandlinefu.com</a> -&nbsp; <a href="http://www.commandlinefu.com/commands/view/4011/check-the-status-of-dd-in-progress" target="_blank">check the status of &#39;dd&#39; in progress</a></p>
<div style="clear: both; margin: 10px 0pt; border: 1px dashed rgb(153, 153, 153); font-size: 12px; padding: 5px 10px;">
<li>本文链接地址：<a href="https://www.dbainfo.net/show-progress-of-dd-command.htm">https://www.dbainfo.net/show-progress-of-dd-command.htm</a>；</li>
<li>本文为dbainfo个人原创，请在尊重作者劳动成果的前提下进行转载；</li>
<li>转载务必注明原始出处 : <a href="https://www.dbainfo.net/">Sybase数据库技术，数据库恢复专家</a>；</li>
<li>对《<a href="https://www.dbainfo.net/show-progress-of-dd-command.htm">显示dd命令的进度</a>》有何疑问或见解，请在本文下方发表；</li>
<li>对网站还有其他问题或建议，请提交在<a href="https://www.dbainfo.net/messages" target="_blank">留言板</a>，谢谢！</li>
</div>
<h2  class="related_post_title">随机日志</h2><ul class="related_post"><li>2011-08-30 -- <a href="https://www.dbainfo.net/mysql-generate-mysqldump-command-with-query.htm" title="mysql下生成备份表的命令的语句">mysql下生成备份表的命令的语句</a> (0)</li><li>2010-08-10 -- <a href="https://www.dbainfo.net/oracle10g-create-database-manully-ora-02778.htm" title="手动创建oracle数据库时报错：ORA-02778">手动创建oracle数据库时报错：ORA-02778</a> (0)</li><li>2015-03-08 -- <a href="https://www.dbainfo.net/sap-pb-cr-number-7.htm" title="SAP PB Enterprise的所有已知BUG列表（7）">SAP PB Enterprise的所有已知BUG列表（7）</a> (0)</li><li>2010-09-07 -- <a href="https://www.dbainfo.net/leavemessage.htm" title="雁过留声">雁过留声</a> (0)</li><li>2010-09-28 -- <a href="https://www.dbainfo.net/view-table-column-properties-ddl.htm" title="查看表中列属性的SQL语句">查看表中列属性的SQL语句</a> (0)</li><li>2010-08-06 -- <a href="https://www.dbainfo.net/sqlserver-2000-table-storage-fillfactor.htm" title="sql server 2000中创建索引时的填充因子fillfactor">sql server 2000中创建索引时的填充因子fillfactor</a> (0)</li><li>2010-04-27 -- <a href="https://www.dbainfo.net/sybase-ase15-replace-string-funciton-str_replace.htm" title="ASE12.x与15.x中的字符串替换功能的实现">ASE12.x与15.x中的字符串替换功能的实现</a> (0)</li><li>2009-12-14 -- <a href="https://www.dbainfo.net/maser-db-timestamp-inconsistent.htm" title="sybase启动报master时间戳不一致的问题">sybase启动报master时间戳不一致的问题</a> (0)</li><li>2010-01-15 -- <a href="https://www.dbainfo.net/sybase-regedit-service-entities.htm" title="恢复注册表中的sybase服务信息">恢复注册表中的sybase服务信息</a> (0)</li><li>2011-10-19 -- <a href="https://www.dbainfo.net/install-ase15-7-glibc-detected-srvbuildres-free-invalid-pointer.htm" title="安装ASE15.7时出现glibc detected *** srvbuildres: free(): invalid pointer问题的解决">安装ASE15.7时出现glibc detected *** srvbuildres: free(): invalid pointer问题的解决</a> (3)</li></ul>]]></content:encoded>
			<wfw:commentRss>https://www.dbainfo.net/show-progress-of-dd-command.htm/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
