Windows Command Line Tools Flashcards
What is the difference between administrative and standard user-command prompts?
Administrative command prompts provide elevated privileges compared to standard user-command prompts.
How do you view directories and files using a command?
Use the dir command, utilizing * and ** for pattern matching.
Example: dir *.txt
Shows all files in the directory that have the extens
How do you navigate to a directory using a relative path?
Use the cd command with a relative path, such as cd Users\student01\Documents.
How do you navigate to a directory using an absolute path?
Use the cd command with an absolute path, such as cd C:\Users\Student01\Documents.
What is the purpose of the chkdsk command?
It is an error-checking program that locates bad sectors and recovers readable information.
What does the /r switch do in the chkdsk command? chkdsk /r
Locates bad sectors and recovers readable information, implying /F when /scan is not specified.
What is the sfc command used for?
It is the System File Checker used to scan and repair system files.
What does the /scannow switch do in the sfc command? sfc /scannow
Scans all protected system files and repairs any issues.
What does the format command do?
It formats a specified drive to a particular file system, such as NTFS.
How do you format a drive using the format command?
Examples:
format <driveletter>: /q /fs:NTFS to perform a quick format to NTFS.
format<driveletter>: fs</driveletter></driveletter>
What is the purpose of the diskpart command?
It is a disk management CLI used to manage disk partitions.
How do you create a primary partition using diskpart?
Use diskpart
list disk
select disk <disknumber>
create partition primary.
list volume <volumenumber></volumenumber></disknumber>
How do you copy a file from one location to another using the copy command?
Example:
copy <driveletter>:\Software\program.iso C:\Users\<username>\Downloads\Programs.</username></driveletter>
How do you copy and rename a file using the copy command?
Examples:
copy memo.doc letter.doc – a copy of the document with a new name
copy robin.txt c:\birds – places a copy of robin.tx in c:\birds directory
What does the xcopy command do?
It copies files and directories, including their structure, from one location to another.
How do you copy files using xcopy while preserving folder structure?
xcopy C:\Users<username>\Documents\MyFolder01 C:\Users<username>\Documents\MyFolder02 /t /e.
How do you copy files using xcopy?
xcopy <driveletter>:\Users\<username>\test01.txt <new>:\Documents\test01.txt</new></username></driveletter>
What is the robocopy command used for?
It is used for robust copying of files and directories, including options for filtering and bandwidth limitations.
How do you move files that are more than 14 days old using robocopy?
robocopy C:\SourceFolder D:\DestinationFolder /move /minage:14.
How do you copy files using robocopy?
robocopy c:\share\ c:\it\dst /e
Copies all files and folders from the folder c:\share to the folder c:\it\dst. The /e added to the command tells robocopy to include empty subdirectories.
What is the dism command used for?
Deployment Image Servicing and Management (DISM.exe) is used to mount and service Windows images or virtual hard disks.
How do you apply an image using dism?
Use DISM.exe /Apply-Image /ImageFile:<path_to_image_file></path_to_image_file>
What is the “net use” command used for?
To assign the disk-drive device name E: to the “letters” shared directory on the \Financial server, type:
net use e: \financial\letters