61阅读

ftp命令详解-NTSD命令详解

发布时间:2018-03-08 所属栏目:电脑基础知识

一 : NTSD命令详解

NTSD命令详解

Process File: ntsd.exe

Process Name: Symbolic Debugger for Windows

Description: ntsd.exe is a process belonging to the Microsoft symbolic debugger that enables you to debug user-mode applications. This program is non-essential process to the running of the system, but should not be terminated unless suspected to be causing problems. Recommendation: Should not be disabled, required for essential applications to work properly.

Author: Microsoft

Part of: Microsoft Windows Operating

文件细节

文件道路: C:\WINDOWS\system32 \ ntsd.exe

文件日期: 2002-08-29 14:00:00

版本: 5.1.2600.0

文件大小: 31.744 字节

检查和和文件hashes

CRC32: 6D35F411

MD5: 8F0A 81E2 3718 E1C9 A4FD 5615 2CAE B88C

SHA1: 60B8 B14E 2D9E A685 4A08 AF82 880C 4116 CE1D C10D

版本资源信息

公司名称: Microsoft Corporation

文件描述: Symbolic Debugger for Windows 2000

文件操作系统: Windows NT, Windows 2000, Windows XP, Windows 2003

文件类型: Application

文件版本: 5.1.2600.0

内部名: NTSD.Exe

法律版权: ? Microsoft Corporation. All rights reserved.

原始的文件名: NTSD.Exe

产品名称: Microsoft? Windows? Operating System

产品版本: 5.1.2600.0

--------------------------------------------------------------------------------

1. ntsd -c q -p PID

2. ntsd -c q -pn ImageName 比如:ntsd -c q -pn qq.exe

- c是表示执行debug命令

q表示执行结束后退出(quit)

-p 表示后面紧跟着是你要结束的进程对应的PID

-pn 表示后面紧跟着是你要结束的进程名(process_name.exe 比如:QQ.exe,explorer.exe 等等,值得注意的是后缀名.exe是不可省略的,否则系统会告诉你“不支持此接口”)

只有System、SMSS.EXE和CSRSS.EXE不能杀。[www.61k.com]前两个是纯内核态的,最后那个是Win32子系统,ntsd本身需要它。ntsd从2000开始就是系统自带的用户态调试工具。被调试器附着(attach)的进程会随调试器一起退出,所以可以用来在命令行下终止进程。使用ntsd自动就获得了debug权限,从而能杀掉大部分的进程。

ntsd.exe NTSD命令详解

-------------------------------------------------------------------------------- 使用NTSD远程调试程序:

NTSD 调试程序在启动时要求用户指定一个要连接的进程。[www.61k.com)使用 TLIST 或 PVIEWER,您可以获得某个现有进程的进程 ID,然后键入 NTSD -p pid 来调试这个进程。NTSD 命令行使用如下的句法: NTSD [options] imagefile

其中,imagefile 是要调试的映像名称,options 是下面选项之一:

表 1. NTSD 映像文件选项

选项 说明

-2 打开一个用于调试字符模式的应用程序的新窗口

-d 将输出重定向到调试终端

-g 使执行自动通过第一个断点

-G 使 NTSD 在子程序终止时立即退出

o 启用多个进程的调试,默认值为由调试程序衍生的一个进程

-p 指定调试由进程 ID 标识的进程

-v 产生详细的输出

例如,假设 inetinfo.exe 的进程 ID 为 104。键入以下命令将 NTSD 调试程序连接到 inetinfo 进程 (IIS)。

NTSD -p 104

也可使用 NTSD 启动一个新进程来进行调试。例如,NTSD notepad.exe 将启动一个新的 notepad.exe 进程,并与它建立连接。

一旦连接到某个进程,您就可以用各种命令来查看堆栈、设置断点、转储内存,等等。

表 2. 常用命令

命令 含义

~ 显示所有线程的一个列表

KB 显示当前线程的堆栈轨迹

~*KB 显示所有线程的堆栈轨迹

R 显示当前帧的寄存器输出

U 反汇编代码并显示过程名和偏移量

D[type][<range>] 转储内存

BP[#] <address> 设置断点

BC[<bp>] 清除一个或多个断点

BD[<bp>] 禁用一个或多个断点

BE[<bp>] 启用一个或多个断点

BL[<bp>] 列出一个或多个断点

关于远程调试的更多信息,请参考下述文章: 如何启用远程安装服务器的“调试”模式,请参考下述文章:

http://support.microsoft.com/kb/236033/zh-cn

--------------------------------------------------------------------------------

ntsd.exe NTSD命令详解

NTSD用法:

usage: ntsd [-?] [-2] [-d] [-g] [-G] [-myob] [-lines] [-n] [-o] [-s] [-v] [-w]

[-r BreakErrorLevel] [-t PrintErrorLevel]

[-hd] [-pd] [-pe] [-pt #] [-pv] [-x | -x{e|d|n|i} <event>]

[-- | -p pid | -pn name | command-line | -z CrashDmpFile]

[-zp CrashPageFile] [-premote transport] [-robp]

[-aDllName] [-c "command"] [-i ImagePath] [-y SymbolsPath]

[-clines #] [-srcpath SourcePath] [-QR \\machine] [-wake <pid>]

[-remote transport:server=name,portid] [-server transport:portid]

[-ses] [-sfce] [-sicv] [-snul] [-noio] [-failinc] [-noshell]

where: -? displays this help text

command-line is the command to run under the debugger

-- is the same as -G -g -o -p -1 -d -pd

-aDllName sets the default extension DLL

-c executes the following debugger command

-clines number of lines of output history retrieved by a remote client -failinc causes incomplete symbol and module loads to fail

-d sends all debugger output to kernel debugger via DbgPrint

-d cannot be used with debugger remoting

-d can only be used when the kernel debugger is enabled

扩展:ntsd命令 / ntsd不是内部命令 / win7 ntsd命令没用

-g ignores initial breakpoint in debuggee

-G ignores final breakpoint at process termination

-hd specifies that the debug heap should not be used

for created processes. This only works on Windows Whistler. -o debugs all processes launched by debuggee

-p pid specifies the decimal process Id to attach to

-pd specifies that the debugger should automatically detach

-pe specifies that any attach should be to an existing debug port -pn name specifies the name of the process to attach to

-pt # specifies the interrupt timeout

-pv specifies that any attach should be noninvasive

-r specifies the (0-3) error level to break on (SeeSetErrorLevel) -robp allows breakpoints to be set in read-only memory

-t specifies the (0-3) error level to display (SeeSetErrorLevel) -w specifies to debug 16 bit applications in a separate VDM

-x sets second-chance break on AV exceptions

-x{e|d|n|i} <event> sets the break status for the specified event -2 creates a separate console window for debuggee

-i ImagePath specifies the location of the executables that generated the fault (see _NT_EXECUTABLE_IMAGE_PATH)

-lines requests that line number information be used if present -myob ignores version mismatches in DBGHELP.DLL

-n enables verbose output from symbol handler

-noio disables all I/O for dedicated remoting servers

-noshell disables the .shell (!!) command

-QR <\\machine> queries for remote servers

ntsd.exe NTSD命令详解

-s disables lazy symbol loading

-ses enables strict symbol loading

-sfce fails critical errors encountered during file searching

-sicv ignores the CV record when symbol loading

-snul disables automatic symbol loading for unqualified names

-srcpath <SourcePath> specifies the source search path

-v enables verbose output from debugger

-wake <pid> wakes up a sleeping debugger and exits

-y <SymbolsPath> specifies the symbol search path (see _NT_SYMBOL_PATH) -z <CrashDmpFile> specifies the name of a crash dump file to debug -zp <CrashPageFile> specifies the name of a page.dmp file

to use with a crash dump

-remote lets you connect to a debugger session started with -server must be the first argument if present

transport: tcp | npipe | ssl | spipe | 1394 | com

name: machine name on which the debug server was created portid: id of the port the debugger server was created on for tcp use: port=<socket port #>

for npipe use: pipe=<name of pipe>

for 1394 use: channel=<channel #>

for com use: port=<COM port>,baud=<baud rate>,

channel=<channel #>

for ssl and spipe see the documentation

example: ... -remote npipe:server=yourmachine,pipe=foobar -server creates a debugger session other people can connect to must be the first argument if present

transport: tcp | npipe | ssl | spipe | 1394 | com

portid: id of the port remote users can connect to

for tcp use: port=<socket port #>

for npipe use: pipe=<name of pipe>

for 1394 use: channel=<channel #>

for com use: port=<COM port>,baud=<baud rate>,

channel=<channel #>

for ssl and spipe see the documentation

example: ... -server npipe:pipe=foobar

-premote transport specifies the process server to connect to

transport arguments are given as with remoting

Environment Variables:

_NT_SYMBOL_PATH=[Drive:][Path]

Specify symbol image path.

_NT_ALT_SYMBOL_PATH=[Drive:][Path]

Specify an alternate symbol image path.

_NT_DEBUGGER_EXTENSION_PATH=[Drive:][Path]

Specify a path which should be searched first for extensions dlls

ntsd.exe NTSD命令详解

_NT_EXECUTABLE_IMAGE_PATH=[Drive:][Path]

Specify executable image path.

_NT_SOURCE_PATH=[Drive:][Path]

Specify source file path.

_NT_DEBUG_LOG_FILE_OPEN=filename

If specified, all output will be written to this file from offset 0.

_NT_DEBUG_LOG_FILE_APPEND=filename

If specified, all output will be APPENDed to this file.

_NT_DEBUG_HISTORY_SIZE=size

Specifies the size of a server's output history in kilobytes

Control Keys:

<Ctrl-B><Enter> Quit debugger

<Ctrl-C> Break into Target

<Ctrl-F><Enter> Force a break into debuggee (same as Ctrl-C)

<Ctrl-P><Enter> Debug Current debugger

<Ctrl-V><Enter> Toggle Verbose mode

<Ctrl-W><Enter> Print version information

ntsd: exiting - press enter ---

扩展:ntsd命令 / ntsd不是内部命令 / win7 ntsd命令没用

二 : linux_fdisk命令详解

fdisk -l
可以列出所有的分区,包括没有挂上的分区和usb设备.我一般用这个来查找需要挂载的分区的位置,比如挂上u盘.
实例解说Linux中fdisk分区使用方法 :
笔记:fdisk -l 列出全部的分区
一、fdisk 的介绍;
fdisk - Partition table manipulator for Linux ,译成中文的意思是磁盘分区表操作工具;本人译的不太好,也没有看中文文档;其实就是分区工具;
fdsik 能划分磁盘成为若干个区,同时也能为每个分区指定分区的文件系统,比如linux 、fat32、 linux 、linux swap 、fat16 以及其实类Unix类操作系统的文件系统等;当然我们用fdisk 对磁盘操作分区时,并不是一个终点,我们还要对分区进行格式化所需要的文件系统;这样一个分区才能使用;这和DOS中的fdisk 是类似的;
笔记:先对一块物理硬盘做一个逻辑分区使用fdisk工具。(www.61k.com]然后对逻辑分区进行分配相应的文件系统。这样的分区才可以使用的。咦那我通过使用df命令之后怎么判断它的文件系统是什么/.
二、合理规划您的硬盘分区;
在操作分区之前,我们要明白硬盘分区一点理论,比如硬盘容量和分区大小的计算;对一个硬盘如何规划分区等,请参考如下文档,谢谢;
《合理规划您的硬盘分区》------- 深有感触呀!
三、fdisk -l 查看硬盘及分区信息;
通过《合理规划您的硬盘分区》 ,我们知道主分区(包括扩展分区)的总个数不能超过四个;也不能把扩展分区包围在主分区之间;根据这个原则,我们划分硬盘分区就比较容易的多;也能为以后减少不必要的麻烦;
1、通过fdisk -l 查看机器所挂硬盘个数及分区情况;
[root@localhost beinan]# fdisk -l
以下是表示第一块硬盘 hda
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS     主分区
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA) 主分区
/dev/hda3 2806 9729 55617030 5 Extended    扩展分区
/dev/hda5 2806 3825 8193118+ 83 Linux     逻辑分区
/dev/hda6 3826 5100 10241406 83 Linux     逻辑分区
/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris 逻辑分区
/dev/hda8 5199 6657 11719386 83 Linux     逻辑分区
/dev/hda9 6658 7751 8787523+ 83 Linux     逻辑分区
/dev/hda10 7752 9729 15888253+ 83 Linux    逻辑分区
以下是表示第二块硬盘sda
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)   主分区
/dev/sda2 26 125 806400 5 Extended      扩展分区
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 76 200781 83 Linux
通过上面的信息,我们知道此机器中挂载两个硬盘(或移动硬盘),其中一个是hda 另一个是sda ;如果我们想查看单个硬盘情况,可以通过 fdisk -l /dev/hda1 或者fdisk -l /dev/sda1 来操作;以fdisk -l 输出的硬盘标识为准;
其中 hda有三个主分区(包括扩展分区),分别是主分区 hda1 hda2 和hda3(扩展分区) ;逻辑分区是 hda5到hda10;
其中 sda 有两个主分区(包括扩展分区),分别是 hda1 和hda2 (扩展分区);逻辑分区是 sda5 hda6 ;
硬盘总容量=主分区(包括扩展分区)总容量
扩展分区容量=逻辑分区总容量
通过上面的例子,我们可以得知 hda=hda1+hda2+hda3,其中hda3=hda5+hda6+hda7+hda8+hda9+hda10 …… ……
逻辑分区的作用是什么呢?
2、关于fdisk -l 一些数值的说明;
Disk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
这个硬盘是80G的,有255个磁面;63个扇区;9729个磁柱;每个 cylinder(磁柱)的容量是 8225280 bytes=8225.280 K(约为)=8.225280M(约为);分区序列 引导 开始 终止 容量 分区类型ID 分区类型
Device Boot Start End Blocks Id System
/dev/hda1 * 1 765 6144831 7 HPFS/NTFS
/dev/hda2 766 2805 16386300 c W95 FAT32 (LBA)
/dev/hda3 2806 9729 55617030 5 Extended
/dev/hda5 2806 3825 8193118+ 83 Linux
/dev/hda6 3826 5100 10241406 83 Linux
/dev/hda7 5101 5198 787153+ 82 Linux swap / Solaris
/dev/hda8 5199 6657 11719386 83 Linux
/dev/hda9 6658 7751 8787523+ 83 Linux
/dev/hda10 7752 9729 15888253+ 83 Linux
说明:
硬盘分区的表示:在Linux 是通过hd*x 或 sd*x 表示的,其中 * 表示的是a、b、c …… …… x表示的数字 1、2、3 …… …… hd大多是IDE硬盘;sd大多是SCSI或移动存储;
引导(Boot):表示引导分区,在上面的例子中 hda1 是引导分区;
Start (开始):表示的一个分区从X cylinder(磁柱)开始;
End (结束):表示一个分区到 Y cylinder(磁柱)结束;
id和System 表示的是一个意思,id看起来不太直观,我们要在fdisk 一个分区时,通过指定id来确认分区类型;比如 7表示的就NTFS 分区;这个在fdisk 中要通过t功能来指定。下面的部份会提到;
Blocks(容量):这是我翻译的,其实不准确,表示的意思的确是容量的意思,其单位是K;一个分区容量的值是由下面的公式而来的;
Blocks = (相应分区End数值 - 相应分区Start数值)x 单位cylinder(磁柱)的容量
所以我们算一下 hda1的 Blocks 的大小 :
hda1 Blocks=(765-1)x8225.280=6284113.92 K = 6284.113.92M
注:换算单位以硬盘厂家提供的10进位算起,如果以操作系统二进制来算,这个分区容量应该更少一些,得出的这个值和我们通过 fdisk -l 看到的 /dev/hda1的值是大体相当的,因为换算方法不一样,所以也不可能尽可能的精确;再加上分区时的一点损失之类,有时或大或小是存在的;
我们查看分区大小或者文件的时候,还是用十进制来计算比较直观;推算办法是 byte 向前推小数点三位就是K ,K单位的值向前推小数点三位就是M,M向前推小数点三位就是G…… …… 一般也差不了多少;这么算就行;
3、估算一个存储设备是否被完全划分;
我们估算一个硬盘是否完全被划分,我们只要看 fdisk -l 输出的内容中的 cylinders(柱体) 上一个分区的End 和下一个分区的Start是不是一个连续的数字,另外要看一下每个硬盘设备的fdisk -l 的开头部份,看一下他的 cylinders(柱体)的值;
比如hda设备,我们看到的是 9729 cylinders ;我们通过 hda的分区表可以看到上一个分区的End的值+1 就是下一个分区的Start 的值;比如 hda2的Start的值是 hda1 的End 的值+1,这证明 hda1 和hda2 中间没有空白分区,是连续的,以此类推;在 hda10,我们看到 End 的值是9729 ,而在fdisk -l头部信息中也有9729 cylinders,证明这个硬盘已经完全划分;
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 76 200781 83 Linux
我们再看看 sda 移动储是不是被完全划分了;sda有 125个cylinders (柱体),有一个主分区和一个扩展分区构成;在扩展分区中,我们看到End的值为125,而这个移动硬盘的cylinder也是125,这能说明这个硬盘不可能再添加任何主分区了;根据我们上面所说的 sda1 sda2 sda5 sda6 之间未有任何未划分空间,但sda6 的cylinders (柱体)的End值却是 76 ,而 sda总的cylinders (柱体)有125个,由此看来sda 在 sda6后面有未划分区域;
至于sda 有多少未划分空间,我们算一下就知道了;扩展分区总容量是 806400 K ,大约是 806.400M左右,而逻辑分区 sda5 和sda6 的大小加起来是 400M左右,所以还仍有400M左右未划分空间,并且只能划分为链逻辑分区;
四、fdisk 对硬盘及分区的操作,进入fdisk 对硬盘操作阶段;
我们可以对硬盘进行分区操作,前提是您把fdisk -l 弄明白了;通过fdisk -l ,我们能找出机器中所有硬盘个数及设备名称;比如上面的例子,我们会看到两个设备一个是/dev/hda ,另一个是/dev/sda ;
fdisk 操作硬盘的命令格式如下:
[root@localhost beinan]# fdisk 设备
比如我们通过 fdisk -l 得知 /dev/hda 或者 /dev/sda设备;我们如果想再添加或者删除一些分区,可以用
[root@localhost beinan]# fdisk /dev/hda

[root@localhost beinan]# fdisk /dev/sda
注 在以后的例子中,我们要以 /dev/sda设备为例,来讲解如何用fdisk 来操作添加、删除分区等动作;
1、fdisk 的说明;
当我们通过 fdisk 设备,进入相应设备的操作时,会发现有如下的提示;以 fdisk /dev/sda 设备为例,以下同;
[root@localhost beinan]# fdisk /dev/sda
Command (m for help): 在这里按m ,就会输出帮助;
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition 注:这是删除一个分区的动作;
l list known partition types 注:l是列出分区类型,以供我们设置相应分区的类型;
m print this menu 注:m 是列出帮助信息;
n add a new partition 注:添加一个分区;
o create a new empty DOS partition table
p print the partition table 注:p列出分区表;
q quit without saving changes 注:不保存退出;
s create a new empty Sun disklabel
t change a partition's system id 注:t 改变分区类型;
u change display/entry units
v verify the partition table
w write table to disk and exit 注:把分区表写入硬盘并退出;
x extra functionality (experts only) 注:扩展应用,专家功能;
其实我们常用的只有注有中文的,其它的功能我们不常用(呵,主要是我不会用,否则早会卖弄一下了);x扩展功能,也不是常用的;一般的情况下只要懂得 d l m p q t w 就行了;
下面以实例操作来详述,没有例子没有办法就,新手也看不懂;
2、列出当前操作硬盘的分区情况,用p;
Command (m for help): p
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 76 200781 83 Linux
3、通过fdisk的d指令来删除一个分区;
Command (m for help): p 注:列出分区情况;
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 76 200781 83 Linux
Command (m for help): d 注:执行删除分区指定;
Partition number (1-6): 6 注:我想删除 sda6 ,就在这里输入 6 ;
Command (m for help): p 注:再查看一下硬盘分区情况,看是否删除了?
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
Command (m for help):
警告:删除分区时要小心,请看好分区的序号,如果您删除了扩展分区,扩展分区之下的逻辑分区都会删除;所以操作时一定要小心;如果知道自己操作错了,请不要惊慌,用q不保存退出;切记切记!!!!在分区操作错了之时,千万不要输入w保存退出!!!
4、通过fdisk的n指令增加一个分区;
Command (m for help): p
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
Command (m for help): n 注:增加一个分区;
Command action
l logical (5 or over) 注:增加逻辑分区,分区编号要大于5;为什么要大于5,因为已经有sda5了;
p primary partition (1-4) 注:增加一个主分区;编号从 1-4 ;但sda1 和sda2都被占用,所以只能从3开始;
p
Partition number (1-4): 3
No free sectors available 注:失败中,为什么失败?
注:我试图增加一个主分区,看来是失败了,为什么失败?因为我们看到主分区+扩展分区把整个磁盘都用光了,看扩展分区的End的值,再看一下 p输出信息中有125 cylinders;最好还是看前面部份;那里有提到;
所以我们只能增加逻辑分区了;
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l 注:在这里输入l,就进入划分逻辑分区阶段了;
First cylinder (51-125, default 51): 注:这个就是分区的Start 值;这里最好直接按回车,如果您输入了一个非默认的数字,会造成空间浪费;
Using default value 51
Last cylinder or +size or +sizeM or +sizeK (51-125, default 125): +200M 注:这个是定义分区大小的,+200M 就是大小为200M ;当然您也可以根据p提示的单位cylinder的大小来算,然后来指定 End的数值。回头看看是怎么算的;还是用+200M这个办法来添加,这样能直观一点。如果您想添加一个10G左右大小的分区,请输入 +10000M ;
Command (m for help):
5、通过fdisk的t指令指定分区类型;
Command (m for help): t 注:通过t来指定分区类型;
Partition number (1-6): 6 注:要改变哪个分区类型呢?我指定了6,其实也就是sda6
Hex code (type L to list codes):L 注:在这里输入L,就可以查看分区类型的id了;
Hex code (type L to list codes): b 注:如果我想让这个分区是 W95 FAT32 类型的,通过L查看得知 b是表示的是,所以输入了b;
Changed system type of partition 6 to b (W95 FAT32) 注:系统信息,改变成功;是否是改变了,请用p查看;
Command (m for help): p
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ c W95 FAT32 (LBA)
/dev/sda2 26 125 806400 5 Extended
/dev/sda5 26 50 201568+ 83 Linux
/dev/sda6 51 75 201568+ b W95 FAT32
6、fdisk 的退出,用q或者 w;
其中 q是 不保存退出,w是保存退出;
Command (m for help): w

Command (m for help): q
7、一个添加分区的例子;
本例中我们会添加两个200M的主分区,其它为扩展分区,在扩展分区中我们添加两个200M大小的逻辑分区;
Command (m for help): p 注:列出分区表;
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
Command (m for help): n 注:添加分区;
Command action
e extended
p primary partition (1-4)
p 注:添加主分区;
Partition number (1-4): 1 注:添加主分区1;
First cylinder (1-125, default 1): 注:直接回车,主分区1的起始位置;默认为1,默认就好;Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-125, default 125): +200M 注:指定分区大小,用+200M来指定大小为200M
Command (m for help): n 注:添加新分区;
Command action
e extended
p primary partition (1-4)
p 注:添加主分区
Partition number (1-4): 2 注:添加主分区2;
First cylinder (26-125, default 26):
Using default value 26
Last cylinder or +size or +sizeM or +sizeK (26-125, default 125): +200M 注:指定分区大小,用+200M来指定大小为200M
Command (m for help): n
Command action
e extended
p primary partition (1-4)
e 注:添加扩展分区;
Partition number (1-4): 3 注:指定为3 ,因为主分区已经分了两个了,这个也算主分区,从3开始;
First cylinder (51-125, default 51): 注:直接回车;
Using default value 51
Last cylinder or +size or +sizeM or +sizeK (51-125, default 125): 注:直接回车,把其余的所有空间都给扩展分区;
Using default value 125
Command (m for help): p
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ 83 Linux
/dev/sda2 26 50 201600 83 Linux
/dev/sda3 51 125 604800 5 Extended
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l 注:添加逻辑分区;
First cylinder (51-125, default 51):
Using default value 51
Last cylinder or +size or +sizeM or +sizeK (51-125, default 125): +200M 注:添加一个大小为200M大小的分区;
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
l 注:添加一个逻辑分区;
First cylinder (76-125, default 76):
Using default value 76
Last cylinder or +size or +sizeM or +sizeK (76-125, default 125): +200M 注:添加一个大小为200M大小的分区;
Command (m for help): p 列出分区表;
Disk /dev/sda: 1035 MB, 1035730944 bytes
256 heads, 63 sectors/track, 125 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 25 201568+ 83 Linux
/dev/sda2 26 50 201600 83 Linux
/dev/sda3 51 125 604800 5 Extended
/dev/sda5 51 75 201568+ 83 Linux
/dev/sda6 76 100 201568+ 83 Linux
然后我们根据前面所说通过t指令来改变分区类型;
最后不要忘记w保存退出;
五、对分区进行格式化,以及加载;
先提示一下;用 mkfs.bfs mkfs.ext2 mkfs.jfs mkfs.msdos mkfs.vfatmkfs.cramfs mkfs.ext3 mkfs.minix mkfs.reiserfs mkfs.xfs 等命令来格式化分区,比如我想格式化 sda6为ext3文件系统,则输入;
[root@localhost beinan]# mkfs.ext3 /dev/sda6
如果我想加载 sda6到目前系统来存取文件,应该有mount 命令,但首先您得建一个挂载目录;比如 /mnt/sda6 ;
[root@localhost beinan]# mkdir /mnt/sda6
[root@localhost beinan]# mount /dev/sda6 /mnt/sda6
[root@localhost beinan]# df -lh
Filesystem 容量 已用 可用 已用% 挂载点
/dev/hda8 11G 8.4G 2.0G 81% /
/dev/shm 236M 0 236M 0% /dev/shm
/dev/hda10 16G 6.9G 8.3G 46% /mnt/hda10
/dev/sda6 191M 5.6M 176M 4% /mnt/sda6
这样我们就能进入 /mnt/sda6目录,然后存取文件了;
具体的权限方法,以及mount 更详细的用法,在以后我会专门写一个帖子;在一帖中放下所有的内容实在有点为难;

三 : 注册、反注册dll文件,regsvr32命令详解

注册、反注册dll文件,regsvr32命令详解   这里有很多Regsvr32命令,看了后就明白了Regsvr32命令修复系统故障实例使用过activex的人都知道,activex不注册是不能够被系统识别和使用的,一般安装程序都会自动地把它所使用的activex控件注册,但如果你拿到的一个控件需要手动注册怎么办呢?如果修改注册表那就太麻烦了,在windows的system文件夹下有一个regsvr32.exe的程序,它就是windows自带的activex注册和反注册工具。[www.61k.com)

2000系统的regsvr32.exe在winnt\system32文件夹下;
WInXP系统的regsvr32.exe在windows\system32文件夹下

regsvr32的用法为:
"regsvr32 [/s] [/n][/u] dllname”。其中dllname为activex控件文件名,建议在安装前拷贝到system文件夹下。

参数有如下意义:
/u——反注册控件
/s——不管注册成功与否,均不显示提示框
/c——控制台输出
/i——跳过控件的选项进行安装(与注册不同)
/n——不注册控件,此选项必须与/i选项一起使用

执行该命令的方法:

1、可以在“开始”--“运行”,调出运行的对话框,也可以使用Win+R热键,然后直接在输入栏输入即可
2、在开始--运行 输入cmd,调出‘命令提示符’窗口,然后再执行regsvr32命令。

二、Regsvr32错误消息的说明
当 使用 Regsvr32.exe 时,它会尝试加载该组件并调用它的 DLLSelfRegister 函数。如果此尝试成功,Regsvr32.exe 会显示一个指示成功的对话框。如果此尝试失败,Regsvr32.exe 会返回一条错误消息,其中可能会包括一个 Win32 错误代码。

以下列表介绍了 RegSvr32 错误消息和可能的原因。

Unrecognized flag:/invalid_flag
键入的标志或开关组合无效(请参阅本文中的“Regsvr32.exe 的用法”一节)。
No DLL name specified.
未包括 .dll 文件名(请参阅本文中的“Regsvr32.exe 的用法”一节)。
Dllname was loaded, but the DllRegisterServer or DllUnregisterServer entry point was not found.
Dllname不是.dll 或.ocx 文件。例如,键入 regsvr32 wjview.exe 就会生成该错误消息。

例 如,键入regsvr32 icwdial.dll 后就会返回该错误消息,因为 Icwdial.dll 文件不能自行注册。如果您怀疑内存中有损坏的Dllname 版本,请尝试重新启动计算机,或重新提取该文件的原始版本。如果您运行的是 Windows NT,可能需要使用 Microsoft Windows NT Server 4.0 资源工具包 中的 Kill 或 Pview 工具。有关其他信息,请单击以查看以下 Microsoft 知识库文章:197155 如何终止孤立进程OleInitialize failed (or OleUninitialize failed).

Regsvr32 必须先初始化COM 库,然后才能调用所需的 COM 库函数并在关闭时撤消对该库的初始化。


一、轻松修复IE浏览器

regsvr32 Shdocvw.dll
regsvr32 Oleaut32.dll
regsvr32 Actxprxy.dll
regsvr32 Mshtml.dll
regsvr32 Urlmon.dll
regsvr32 browseui.dll

作用:
1、同时运行以上命令不仅可以解决IE不能打开新的窗口,用鼠标点击超链接也没有任何反应的问题;
2、还能解决大大小小的其它IE问题,比如网页显示不完整,JAVA效果不出现,网页不自动跳转,打开某些网站时总提示‘无法显示该页’等。

二、解决Windows无法在线升级的问题

regsvr32 wupdinfo.dll

作用:
Windows的漏洞很多,每隔一段时间就需要使用“Windows Update”升级程序进行在线升级,不过“Windows Update”经常出现无法使用的情况,这时,我们可以使用Regsvr32来解决这个问题。

三、防范网络脚本病毒有新招

regsvr32 /u scrrun.dll

作用:
网络脚本病毒嵌在网页中,上网时在不知不觉中机器就会感染上这种病毒。笔者认为单纯使用杀毒软件并不能有效地防范这些脚本病毒,必须从病毒传播的机理入手。网络脚本病毒的复制、传播都离不开FSO对象(File System Object,文件系统对象),因此禁用FSO对象就能有效地控制脚本病毒的传播。
如果需要使用FSO对象,键入“regsvr32 scrrun.dll”命令即可。

四、卸载Win XP自带的ZIP功能

regsvr32 /u zipfldr.dll

作用:
Win XP以功能强大而著称,但有些功能却常常令人有“鸡肋”之感,比如Win XP自带的ZIP功能和图片预览功能,不仅占用了系统资源,功能也远不如第三方软件强大。其实用Regsvr32命令可以很容易地卸载这些功能。

五、修复无法缩略图查看文件问题

2000: 开始→运行,输入regsvr32 thumbvw.dll
XP: 开始→运行,输入regsvr32 shimgvw.dll

六、让WMP播放器支持RM格式

很多朋友喜欢用Windows Media Player(以下简称WMP)播放器,但是它不支持RM格式,难道非得安装其它播放软件吗?笔者有办法。

以Win XP为例,首先下载一个RM格式插件,解压缩后得到两个文件夹: Release(用于Windows 9x)和Release Unicode (用于Windows 2000/XP);将Release Unicode文件夹下的RealMediaSplitter.ax文件拷贝到“系统盘符\WINDOWS\System32\”目录下;在“开始→运行 ”中键入“regsvr32 RealMediaSplitter.ax”,点击“确定”即可。接着下载解码器,如Real Alternative,安装后就能用WMP播放RM格式的影音文件了。

七、让WMP9的播放器出现

有些音乐网页的在线点歌需要用到Media Player,有的朋友明明安装了WMP9,但在线听音乐却只看到枯燥的WMP6播放器面板,想让漂亮的WMP9面板出现,当然没问题的。

常见问题的操作系统多数WIN 98,先关闭IE,再在“开始→运行”中键入“regsvr32 wmpdxm.dll”,点击“确定”即可。

八、解决打开系统功能时无反应

regsvr32 shdocvw.dll

作用:
有时从开始菜单里点击XP系统的搜索功能、帮助和支持或管理工具等,但就是无任何反应,这是它们的打开方式缺少关联,所以我们只要用regsvr32注册它们需要调用的动态连接库文件就行了。

九、添加/删除程序打不开了

regsvr32 appwiz.cpl
regsvr32 mshtml.dll
regsvr32 jscript.dll
regsvr32 msi.dll
regsvr32 "c:\program files\common files\system\ole db\oledb32.dll"
regsvr32 "c:\program files\common files\system\ado\msado15.dll"
regsvr32 mshtmled.dll
regsvr32 /i shdocvw.dll
regsvr32 /i shell32.dll

作用:
当打开控制面板中的添加/删除程序时,双击它的图标后无反应,或者打开后自动关闭了,尝试使用以上命令可以解决。

十、XP的用户帐户打不开regsvr32 nusrmgr.cpl

regsvr32 mshtml.dll
regsvr32 jscript.dll
regsvr32 /i shdocvw.dll

十一、防范网络脚本病毒有新招

regsvr32 /u scrrun.dll 禁用FSO对象
regsvr32 scrrun.dll 使用FSO对象

十二、解决Windows无法在线升级补漏洞的问题

regsvr32 wupdinfo.dll

以下症状我把它称作IE的活动脚本漏洞,虽然这两个命令能修复,但治标不治本,我建议遇到此问题的朋友到微软网站进行IE安全更新,即打漏洞补丁。

regsvr32 jscript.dll
regsvr32 vbscript.dll

作用:
1、跟上面讲的修复IE浏览器方法配合使用(可以不配),可以很好的解决浏览某些网页无法正常显示和功能不正常,如:
a.不显示某些验证码
b.不显示某些动态图片
c.不显示某些论坛的帖子列表
d.论坛快速跳转功能无用
e.论坛发贴时按Ctrl+Enter提交无反应

2、修复个别窗口空白,如XP的‘搜索’功能的搜索助理操作面板空白、系统还原页面空白和用户帐户页面空白等。(可修复把握度100%)

3、解决windows media player 9或以上版本打开时提示‘出现内部应用程序错误’。(可修复把握度100%)

4、可以修复win 2000的‘添加/删除程序’打开后一片空白。(可修复把握度99%)

5、解决win 2000以WEB方式查看Program Files文件夹和Winnt文件夹时看不到任何文件,以及‘控制面板’的图标跑到左边去的问题。

6、解决网页上网际快车的右键菜单功能无法使用。
在网站中,当右键点某个‘下载连接’时,会弹出菜单,选择‘使用网际快车下载’会再弹出FLASHGET的下载任务页面,如果发现该功能无反应,那就可能是这个原因:原来这项菜单是调用了FLASHGET目录下的jc_link.htm文件,这个文件是用VB语言编写的,所以其作用丢失是动态连接库 vbscript.dll没有注册和调用到。

本文标题:ftp命令详解-NTSD命令详解
本文地址: http://www.61k.com/1115683.html

61阅读| 精彩专题| 最新文章| 热门文章| 苏ICP备13036349号-1