Operating System Navigation and Command-Line Tools Flashcards
CompTIA A+ 220-1102 Exam Criteria
dir
Purpose: Displays directory of files and directories stored on disk.
cd
The cd (change directory) command allows you to move between directories. The cd command takes an argument, usually the name of the folder you want to move to
md
the md command, which creates a directory or subdirectory.
rmdir
Use the rmdir command to remove the directory, specified by the Directory parameter, from the system. The directory must be empty (it can contain only . and ..) before you can remove it, and you must have write permission in its parent directory.
How can you navigate to a drive?
C: or D: - depending on the drive you want to go to
What Command do you use to check if there is any error on the disk?
chkdsk /r = Locates bad sector and recovers readable information (implies /F (fixes error on disk) when not specified)
how can I check files if there are problems with them?
System File Checker is a utility in Windows that checks for problems with files on your computer. (sfc)
What command line tool do I have to scan file for problems and replace the corrupted files?
The sfc /scannow command will scan all protected system files, and replace corrupted files with a cached copy that is located in a compressed folder at %WinDir%\System32\dllcache.
What is the difference between sfc and chkdsk ?
Both have almost the same function, which is to detect file errors. However, SFC has its specifications for the Windows series mentioned above. Not only that, but SFC will also automatically take action, unlike CHKDSK, which tends to only “report.
What command line tool do I use if I only want to verify system files without repairs being done?
sfc /verifyonly
How can I scan a particular system file only and repair it?
sfc /scanfile (filepath)
How can I check integrity of a system file without repairing it?
sfc /verifyfile (filepath)
What does the format command do?
The format command creates a new root directory and file system for the disk. It can also check for bad areas on the disk, and it can delete all data on the disk. To be able to use a new disk, you must first use this command to format the disk
How can I format the disk drive D using the format command line tool?
format Y: /q /fs:ntfs
enter current volume for drive Y: (enter drive volume)
What is the function of the diskpart on disk management command line interface?
The diskpart command interpreter helps you manage your computer’s drives (disks, partitions, volumes, or virtual hard disks). Before you can use diskpart commands, you must first list, and then select an object to give it focus. After an object has focus, any diskpart commands that you type will act on that object.
I need to find out how many disk is partitions on my computer, which command line tool can I use?
diskpart list disk
What command line tool can be used to select a disk part?
diskpart select disk (enter disk number here)
What command line tool can I use to create primary partition and allocate size?
diskpart create partition primary size=2048
How can I list the volume on disk partition command line tool? I also want to assign the volume?
disk part list volume
disk part assign
I need to copy a file what command line should I use?
copy
how can I copy file into the same folder
C:\Users\JohnVargas\Documents\Test1>copy hello2.txt hello3.txt
You will need to use file path and then copy filename.txt newfilename.txt
You can also delete via:
C:\Users\JohnVargas\Documents\Test1>del filename.txt
How can I copy one file into another directory?
File path: xcopy (enter file path) (enter new file path where file is going to the new directory)
eg.
C:\Users\JohnVargas\Documents\Test1>xcopy C:\users\johnvargas\Documents\Test1 C:\Users\JohnVargas /E /I
(/E = copies all files including empty sub directories) (/I will make a new directory for you if the directory does not exist)
What does robocopy utilizes?
Robocopy is a robust file copying program built into Windows similar to UNIX rsync. It is a much better method of copying large datasets or lots of files across volumes and is a great tool for backing up data. It has the ability to resume copies if interrupted, various options and logging during copying
how to structure command line using robocopy?
robocopy /sourcepathA SourcepathB /E
What does DISM tool utilize?
Deployment Image Servicing Management Tool
Microsoft Windows Deployment Image Servicing and Management (DISM) is a command-line tool that allows IT administrators to service Windows desktop images and virtual hard disks prior to deployment to users. DISM is an administrator-level tool to repair Windows images and make changes to Windows installation media.
If the SFC isn’t working, try DISM. The DISM (Deployment Image Servicing and Management) tool uses Windows Update to restore corrupted system files.
How to repair windows image and check status on DISM command line?
dism /online /cleanup-image /CheckHealth
Once you complete the steps, the Deployment Image Servicing and Management tool will run and verify any data corruption that may require fixing inside the local image
What command line do you use to verify any corrupt files on the system image file via DISM?
dism /Online /Cleanup-Image /ScanHealth
If there are problems with the system image, what command line can you use with DISM command line?
dism /Online /Cleanup-Image /RestoreHealth
How can I shutdown the computer on the command line tool?
shutdown
What does winver command do?
Shows you the current windows version that the OS is operating in.