Tech Tip: Defrag from the command line
Takeaway:
Windows XP comes with Disk Defragmenter, which is a slimmed down version of Executive Software's Diskeeper disk defragmentation program. This utility is accessible via the Computer Management Microsoft Management Console (MMC) and as a stand-alone utility on the Tools tab of each hard drive's Properties dialog box.
There's also a command-line version of this utility called Defrag. If you want to quickly configure and launch a defragment operation, it's easier to use the command line rather than accessing the GUI version and then drilling down through a number of options.
To run Defrag, open a command prompt window and type the following command:
Defrag x: [/parameter]
In this example, x is the drive letter of the hard disk you want to defragment, and parameter is one of three optional settings that you can use to configure Defrag:
When you use either the /a or /v parameters, Defrag displays the results on the command line. However, if you'd rather have the results available as a file, use the DOS redirection symbol to send the report to a file. For example, you can redirect the results to a file called Defrag-Results.txt by using this command:
Defrag x: [/parameter] > Defrag-Results.txt
SponsoredWhite Papers, Webcasts, and Downloads
- TCP/IP Sleuthing--Troubleshooting TCP/IP Using Your Toolbox Global Knowledge
- 7 More Red Hat Linux Tips and Tricks Global Knowledge
- Understanding Voice over IP Signaling Protocols in Cisco Telephony Implementations Global Knowledge
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET






