CertCities.com -- The Ultimate Site for Certified IT Professionals
Register today for a Free Sponsored Tech Library Webcast and you could WIN! Share share | bookmark | e-mail
  Microsoft®
  Cisco®
  Security
  Oracle®
  A+/Network+"
  Linux/Unix
  More Certs
  Newsletters
  Salary Surveys
  Forums
  News
  Exam Reviews
  Tips
  Columns
  Features
  PopQuiz
  RSS Feeds
  Press Releases
  Contributors
  About Us
  Search
 

Advanced Search
  Free Newsletter
  Sign-up for the #1 Weekly IT
Certification News
and Advice.
Subscribe to CertCities.com Free Weekly E-mail Newsletter
CertCities.com

See What's New on
Redmondmag.com!

Cover Story: IE8: Behind the 8 Ball

Tech-Ed: Let's (Third) Party!

A Secure Leap into the Cloud

Windows Mobile's New Moves

SQL Speed Secrets


CertCities.com
Let us know what you
think! E-mail us at:



 
 
...Home ... Editorial ... Columns ..Column Story Saturday: April 5, 2014


 Dulaney on Certs  
Emmett Dulaney
Emmett Dulaney


 A Look at Command Line OS Tools, Part 1
The command line utilities you need to know for the CompTIA A+ exam's OS domain.
by Emmett Dulaney  
7/12/2012 -- A few months ago, we took a look at the networking command line tools that the next release of the A+ exams from CompTIA includes in their objectives. The number of command line utilities beneath the operating system domain (1.3) is double that for networking; thus, we will look at the first half for this column and the second half the next time we visit the topic.

All of the tools are available in Windows XP, Vista and Windows 7, and the list includes: TASKKILL, BOOTREC, SHUTDOWN, TASKLIST, MD, RD, CD, DEL, FDISK and FORMAT. These OS command line tools are discussed in the sections that follow.

TASKKILL Command
The TASKKILL.EXE utility is used to terminate processes. Those processes can be identified by either name or process ID number (PID) and the process can exist on the machine where the administrator is sitting (the default) or on another machine -- in which case you signify the other system by using the /S switch.

The /IM name is used to specify an (image) name of a process to kill and can include the wildcard (*) characters. If the process ID number is used in place of the name, then the /PID switch is needed. The processes in question are the same which can be killed through the Task Manager. There are two signals that can be sent: The default is SIGTERM (a gentle kill, related to code 15) and the /F switch issues a SIGKILL (a terminate at all cost kill, related to code 9).

BOOTREC
The BOOTREC.EXE utility can be run in Windows 7 or Windows Vista to interact with the Master Boot Record (MBR), boot sector, or Boot Configuration Data (BCD) store. It cannot be used with Windows XP since it uses a different boot structure. Tip: BOOTREC can be thought of as the replacement for the Recovery Console that was used in Windows XP.

To run the tool, you must boot from the installation disc, choose the Repair Your Computer option and enter the Recovery Console. Choose Command Prompt from the System Recovery Options and then type bootrec.exe.

The options for BOOTREC are /FIXBOOT (to write a new boot sector), /FIXMBR (to write a new MBR), /REBUILDBCD (to rebuild the BCD store) or /SCANOS (to scan all disks for installations the Boot Manager menu is not listing).

SHUTDOWN
The SHUTDOWN.EXE utility can be used to schedule a shutdown (complete or a restart) locally or remotely. A variety of reasons can be specified and announced to users for the shutdown. Three parameters to be aware of are /S (turns the computer off), /R (restarts the computer) and /M (lets you specify a computer other than this one).

TASKLIST
The TASKLIST.EXE utility is used at the command line to see a list of all the running processes (and their process ID number), similar to what you see in the GUI by using Task Manager. By default, it shows the processes on the current machine, but the /S switch can be used to see the processes on a remote machine. /SVC will show the services hosted in each process and you can use /U if you need to run the command as another user (/P allows you to specify a password associated with that user).

MD
The MD command is used to make directories. It's a shorthand version of the MKDIR command. The following table describes its use and switches (we discuss RD and CD next).

CD, MD, and RD use and switches

Command

Purpose

CD    [path]

Changes to the specified directory.

CD /D    [drive:][path]

Changes to the specified directory on the drive.

CD ..

Changes to the directory that is up one level.

CD\

Changes to the root directory of the drive.

MD    [drive:][path]

Makes a directory in the specified path. If you don't specify a path, the directory will be created in your current directory.

RD    [drive:][path]

Removes (deletes) specified directory.

RD /S [drive:][path]

Removes all directories and files in the specified directory, including the specified directory itself.

RD /Q    [drive:][path]

Quiet mode. It won't ask whether you're sure you want to delete the specified directory when you use /S.

RD
The RD command is used to remove directories. It's a shorthand version of the RMDIR commands.

CD
The CD command is used to change (or display). It's a shorthand versions of the CHDIR command.

DEL
The DEL command is used to delete files and directories at the command line. Wildcards can be used with it. ERASE performs the same operations.

FDISK
The FDISK command used to be included with earlier operating systems to make disk partitioning possible. This command does not exist in Windows 7, Vista, or XP, having been replaced with DISKPART. CompTIA lists it as a command to know, and for the exam you should know that it is not included with the current versions of Windows.

FORMAT
The FORMAT command is used to wipe data off disks and prepare them for new use. Before a hard disk can be formatted, it must have partitions created on it. (Partitioning was done in the DOS days with the FDISK command, but as we just mentioned, that command does not exist in Windows 7, Vista, or XP, having been replaced with DISKPART.) The syntax for FORMAT is as follows:

FORMAT [volume]  [switches]

The volume parameter describes the drive letter (for example, D:), mount point, or volume name. The following table lists some common FORMAT switches.

Switch

Purpose

/FS:[filesystem]

Specifies the type of filesystem to use (FAT, FAT32, or NTFS)

/V:[label]

Specifies the new volume label

/Q

Executes a quick format

There are other options as well to specify allocation sizes, the number of sectors per track, and the number of tracks per disk size. However, we don't recommend that you use these unless you have a very specific need. The defaults are just fine.

So, if you wanted to format your D: drive as NTFS with a name of HDD2, you would type the following:

FORMAT D: /FS:NTFS /V:HDD2

Warning: Before you format anything, be sure you have it backed up or be prepared to lose whatever is on that drive!


Emmett Dulaney is the author of several books on Linux, Unix and certification. He can be reached at .

 


More articles by Emmett Dulaney:

-- advertisement --


There are 25 CertCities.com user Comments for “A Look at Command Line OS Tools, Part 1”
Page 1 of 3
9/22/12: ???? from [email protected] says: ??????????,???,????,????VPN?,???,????http://www.35vpn.com/ ,???????,????. http://www.35vpn.com/
3/4/13: Jordan Retro 7 Rapto from [email protected] says: Exactly where there exists certainly nuptials with out seriously like, there'll be seriously like with out nuptials. Jordan Retro 7 Raptors http://www.jordanretro7air.com/
3/5/13: www.g77.fr from [email protected] says: An honest pal are you who actually overlooks an individual's downfalls and can handle an individual's achievements. www.g77.fr http://www.g77.fr/
5/9/13: cheap jordan shoes from nikeoutletoepstwtghb says: wow,damm good post
6/2/13: akb48 from [email protected] says: I like this post, enjoyed this one appreciate it for posting . akb48 http://www.uonobu.co.jp/shop/akb48.html
6/3/13: ????? ???? from [email protected] says: You are my inhalation, I own few blogs and occasionally run out from brand :). "He who controls the past commands the future. He who commands the future conquers the past." by George Orwell. ????? ???? http://www.k-jinken.ne.jp/book21.htm
6/3/13: windows8 ????? from [email protected] says: Very interesting topic , thanks for putting up. "I am not an Athenian or a Greek, but a citizen of the world." by Socrates. windows8 ????? http://artenfant.com/shop/win8.html
6/3/13: ?? ???? from [email protected] says: I've read a few good stuff here. Certainly value bookmarking for revisiting. I surprise how so much effort you put to make this kind of great informative web site. ?? ???? http://www.tonpo-center.net/shinsailQA.htm
6/3/13: ???????BURNERSUPERFA from [email protected] says: We're a group of volunteers and opening a new scheme in our community. Your site provided us with valuable info to work on. You've done a formidable job and our entire community will be grateful to you. ???????BURNER SUPERFAST2.0 http://artenfant.com/shop/taylormade.html
6/4/13: ???????RocketBallzRB from [email protected] says: Hi there, just became aware of your blog through Google, and found that it is truly informative. I? going to watch out for brussels. I?l be grateful if you continue this in future. Many people will be benefited from your writing. Cheers! ??????? RocketBallz RBZ http://burgmancat.com/shop/taylormade.html
First Page   Next Page   Last Page
Your comment about: “A Look at Command Line OS Tools, Part 1”
Name: (optional)
Location: (optional)
E-mail Address: (optional)
Comment:
   

-- advertisement (story continued below) --

top