Why does the cd command occasionally take several seconds to complete?

0

Sometimes, when using the command prompt, the cd command finishes quickly, but often it takes several seconds. What does it indicate? What's the bottleneck?

prongs

Posted 2012-06-08T08:36:00.690

Reputation: 609

Is the location you're trying to cd to a network resource, perhaps? Or maybe a hard drive that needs to spin up first? What happens when you try to open that location in Windows Explorer? – Indrek – 2012-06-08T08:42:20.310

it's a hard drive. that location does open, but slowly. – prongs – 2012-06-08T08:43:12.860

A couple of things to try: 1) defrag the hard drive; 2) check SMART attributes with HD Tune or similar utility; 3) run chkdsk and see if it reports any errors.

– Indrek – 2012-06-08T08:47:36.060

how do i find the spinning speed of the hard disk? – prongs – 2012-06-08T08:58:47.560

HD Tune or Device Manager can give you the model number. Type that into your search engine of choice and you should find the specs, including the rotational speed. – Indrek – 2012-06-08T09:03:00.020

IDE\DiskHITACHI_HTS722010K9SA00_________________DC2ZC75A. Google is not very helpful – prongs – 2012-06-08T11:43:41.243

Here, let me Bing that for you. That's a Hitachi Travelstar 7K200, 100 GB, 7200 rpm, 16 MB cache.

– Indrek – 2012-06-08T11:58:43.933

@Indrek: thanks for the tip. chkdsk really did work. It removed a lot of bad sectors and my lappy is fast again. :) – prongs – 2012-06-11T11:03:07.667

Good to hear :) I've posted my comment as an answer; consider accepting it so others who find this question can immediately see what fixed the problem for you. Also, keep running chkdsk regularly to see if the drive deteriorates further. If it does, back up your data and buy a new one as soon as you can. – Indrek – 2012-06-11T15:36:44.927

Answers

0

A couple of things to try:

  1. Defragment the hard drive. The built-in defrag utility is fine, though for more advanced tuning (system file defragmentation, free space consolidation etc.) you can look into third-party programs like Auslogics Disk Defrag.
  2. Check the hard drive's SMART attributes with HD Tune or similar program. See the Wikipedia article for a list of attributes, including those that are potential indicators of hardware problems.
  3. Run chkdsk to find and fix errors with the filesystem and bad sectors on the hard drive.

Indrek

Posted 2012-06-08T08:36:00.690

Reputation: 21 756