Windows Command Line Tools Flashcards

1
Q

What is the difference between administrative and standard user-command prompts?

A

Administrative command prompts provide elevated privileges compared to standard user-command prompts.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you view directories and files using a command?

A

Use the dir command, utilizing * and ** for pattern matching.

Example: dir *.txt
Shows all files in the directory that have the extens

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you navigate to a directory using a relative path?

A

Use the cd command with a relative path, such as cd Users\student01\Documents.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you navigate to a directory using an absolute path?

A

Use the cd command with an absolute path, such as cd C:\Users\Student01\Documents.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of the chkdsk command?

A

It is an error-checking program that locates bad sectors and recovers readable information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the /r switch do in the chkdsk command? chkdsk /r

A

Locates bad sectors and recovers readable information, implying /F when /scan is not specified.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the sfc command used for?

A

It is the System File Checker used to scan and repair system files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does the /scannow switch do in the sfc command? sfc /scannow

A

Scans all protected system files and repairs any issues.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the format command do?

A

It formats a specified drive to a particular file system, such as NTFS.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you format a drive using the format command?

A

Examples:
format <driveletter>: /q /fs:NTFS to perform a quick format to NTFS.
format<driveletter>: fs</driveletter></driveletter>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of the diskpart command?

A

It is a disk management CLI used to manage disk partitions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you create a primary partition using diskpart?

A

Use diskpart
list disk
select disk <disknumber>
create partition primary.
list volume <volumenumber></volumenumber></disknumber>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you copy a file from one location to another using the copy command?

A

Example:
copy <driveletter>:\Software\program.iso C:\Users\<username>\Downloads\Programs.</username></driveletter>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you copy and rename a file using the copy command?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What does the xcopy command do?

A

It copies files and directories, including their structure, from one location to another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How do you copy files using xcopy while preserving folder structure?

A

xcopy C:\Users<username>\Documents\MyFolder01 C:\Users<username>\Documents\MyFolder02 /t /e.

17
Q

How do you copy files using xcopy?

A

xcopy <driveletter>:\Users\<username>\test01.txt <new>:\Documents\test01.txt</new></username></driveletter>

18
Q

What is the robocopy command used for?

A

It is used for robust copying of files and directories, including options for filtering and bandwidth limitations.

19
Q

How do you move files that are more than 14 days old using robocopy?

A

robocopy C:\SourceFolder D:\DestinationFolder /move /minage:14.

20
Q

How do you copy files using robocopy?

A

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.

20
Q

What is the dism command used for?

A

Deployment Image Servicing and Management (DISM.exe) is used to mount and service Windows images or virtual hard disks.

21
Q

How do you apply an image using dism?

A

Use DISM.exe /Apply-Image /ImageFile:<path_to_image_file></path_to_image_file>

22
Q

What is the “net use” command used for?

A

To assign the disk-drive device name E: to the “letters” shared directory on the \Financial server, type:

net use e: \financial\letters