Windows Defrag命令教程

Disk performance is a very important factor for Desktops and Servers. Desktops and Servers use disks very busy way to write and read data. While buying disk we should prefer a faster disk according to our budget. There is a way to make a disk faster without paying any money. We can defrag disks in Windows operating system. Keep in mind that this won’t work for SSD. We can use defragcommand to make our disk tidy for a file system.

磁盘性能是台式机和服务器的重要因素。 台式机和服务器使用磁盘非常忙的方式来写入和读取数据。 在购买磁盘时,我们应该根据预算选择更快的磁盘。 有一种方法可以使磁盘更快而无需支付任何费用。 我们可以在Windows操作系统中对磁盘进行碎片整理。 请记住,这不适用于SSD。 我们可以使用defrag命令使文件系统的磁盘整齐。

GUI或命令行 (GUI or Command Line)

defrag can be done in two ways. The first one is the GUI way Windows operating systems provide a GUI tool called Disk Defragmenter. Another way is using the command-line tool defrag .

可以通过两种方式进行defrag 。 第一个是GUI方式,Windows操作系统提供了一个称为Disk Defragmenter的GUI工具。 另一种方法是使用命令行工具defrag

磁盘碎片整理程序 (Disk Defragmenter)

We can find Disk Defragmenter GUI tool in Program files -> Accessories or simply writing down to the Start menu.

我们可以在程序文件->附件中找到Disk Defragmenter GUI工具,或者简单地写下“ Start菜单。

Disk Defragmenter
Disk Defragmenter
磁盘碎片整理程序

The current status of partitions is listed with related drive letters. Also, last run information is given. Prevent defragmenting System Reserved partitions. We can select a partition and click the Defragment disk button to start the defragmentation. This may take some time. Also, we can click Configure schedule button to configure defragmentation for future times to start automatically.

分区的当前状态与相关的驱动器号一起列出。 此外,还会提供上次运行信息。 防止对系统保留分区进行碎片整理。 我们可以选择一个分区,然后单击“碎片整理磁盘”按钮以开始碎片整理。 这可能要花点时间。 另外,我们可以单击“ Configure schedule按钮来配置碎片整理,以便将来自动启动。

碎片整理命令 (Defrag Command)

defrag is an MS-DOS or Powershell command. In order to run defrag we need Administrator privileges which means we should start the command line as Administrator.

defrag是MS-DOS或Powershell命令。 为了运行碎片整理,我们需要管理员权限,这意味着我们应该以管理员身份启动命令行。

碎片整理帮助 (Defrag Help)

We can list detailed help information about the defrag command like below.

我们可以列出有关defrag命令的详细帮助信息,如下所示。

> defrag /?
Defrag Help
Defrag Help
整理碎片

执行碎片整理(Perform Defrag To A Volume)

The most popular usage form of defrag is operating only a single volume. We need to specify the volume or partition name to the command. In this example, we will defrag E: partition.

defrag的最流行用法是仅操作单个卷。 我们需要为命令指定卷或分区名称。 在此示例中,我们将对E:分区进行碎片整理。

> defrag E:
Perform Defrag To A Volume
Perform Defrag To A Volume
执行碎片整理

After defragmentation following information is provided.

碎片整理后,将提供以下信息。

  • Volume Size

    体积大小
  • Free Space

    可用空间
  • Total Fragmented Space

    总碎片空间
  • Largest Free Space Size

    最大可用空间
LEARN MORE  hdparm Command Tutorial with Examples For Linux
了解更多有关适用于Linux的示例的hdparm命令教程

在所有卷中执行碎片整理(Perform Defrag In All Volumes)

If we want to defrag in all volumes we can use /C option. This will start the defragmentation process in all volumes in a sequential manner.

如果要对所有卷进行碎片整理,则可以使用/C选项。 这将按顺序启动所有卷中的碎片整理过程。

> defrag /C

在屏幕上显示碎片整理进度 (Show Defrag Progress In Screen)

Defragmentation operation generally takes sometimes. We can list the current situation of defragmentation in the command line with /V option. In this example, we will list defragmentation progress of volume E:

碎片整理操作通常需要花费一些时间。 我们可以使用/V选项在命令行中列出碎片整理的当前情况。 在此示例中,我们将列出卷E:碎片整理进度E:

> defrag E: /V
Show Progress In Screen
Show Progress In Screen
在屏幕上显示进度

翻译自: https://www.poftut.com/windows-defrag-command-tutorial-examples-defrag-disks/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值