Shared Flashcard Set

Details

Command Prompt
Chapters 7 through 9
71
Computer Science
Professional
05/31/2009

Additional Computer Science Flashcards

 


 

Cards

Term
what command can show if a file is read-only?
Definition
attrib
Term
can you type attrib without any switches?
Definition
yes, attrib will show the attributes of all files in the current directory
Term
what is the command to make readme.txt a hidden file?
Definition
attrib +h readme.txt
Term
what is the command to remove the hidden attribute from readme.txt?
Definition
attrib -h readme.txt
Term
what is the command to make readme.txt hidden, system and read-only?
Definition
attrib +s +h +r readme.txt
Term
what is the command to make all mp3 files hidden?
Definition
attrib +h *.mp3
Term
what is the command to make all of the files in c:\windosbk hidden including subfolders?
Definition
attrib +h c:\windosbk /s
Term
what is the command to substitute a drive letter for a directory?
Definition
subst
Term
can you type subst without any switches?
Definition
yes, subst will show which drive letters have already been substituted
Term
what is the command to substitute w: for c:\windows?
Definition
subst w: c:\windows
Term
what is the command to substitute t: for c:\temp?
Definition
subst t: c:\temp
Term
what is the command to view the substituted drive letters?
Definition
subst
Term
what is the command to delete the substituted drive t:?
Definition
subst t: /d
Term
what two commands can you use to copy files?
Definition
copy and xcopy
Term
can the copy command copy a directory structure?
Definition
no, you must use xcopy to copy a directory structure
Term
what two xcopy switches look at the archive attribute prior to copying?
Definition
xcopy /a and xcopy /m both look at the archive attribute
Term
what xcopy switch looks at the archive attribute and does not change the attribute after copying?
Definition
xcopy /a
Term
what is the command to copy all files in the current directory after 10-25-09 and place them in c:\backup?
Definition
xcopy .\*.* c:\backup /d:10-25-09
Term
what is the xcopy switch that copies directories except empty directories?
Definition
xcopy /s
Term
what is the xcopy switch that copies directories including empty directories?
Definition
xcopy /e
Term
what is the xcopy switch that continues to copy even if there are errors?
Definition
xcopy /c
Term
what is the xcopy switch that verifies that the files were copied correctly?
Definition
xcopy /v
Term
what is the xcopy switch that copies hidden and system files?
Definition
xcopy /h
Term
does xcopy without switches overwrite read-only files?
Definition
no, you must use a switch to overwrite read-only files
Term
what is the xcopy switch that overwrites read-only files?
Definition
xcopy /r
Term
does xcopy also copy the attributes without switches?
Definition
no, you must use a switch to copy the attributes to the destination files
Term
what is the xcopy switch to copy the attributes?
Definition
xcopy /k
Term
what is the command to copy all of the files from c:\windosbk to c:\backup that already exist in c:\backup?
Definition
xcopy c:\windosbk\*.* c:\backup /u
Term
what command can show me all of the commands that have been entered on the current command prompt window?
Definition
doskey /history
Term
how can I make a file called allcommands.txt that show all of the commands that have been entered on the current command prompt window?
Definition
doskey /history > allcommands.txt
Term
what two commands can show me files and directories?
Definition
dir and tree
Term
does typing the tree command show files?
Definition
no, tree only shows directories
Term
what is the tree switch to show files?
Definition
tree /f
Term
what is the command to show the directory structure without files of a floppy disk?
Definition
tree a:\
Term
what is the command to show the directory structure including files for c:\windows?
Definition
tree c:\windows /f
Term
what is the command to check the filesystem?
Definition
chkdsk
Term
how can you tell where chkdsk is located?
Definition
dir c:\chkdsk*.* /s
Term
what is the chkdsk switch to fix filesystem errors on the disk?
Definition
chkdsk /f
Term
what is the chkdsk switch to recover data from bad sectors?
Definition
chkdsk /r
Term
do you need chkdsk /f switch when using chkdsk /r switch?
Definition
no, chkdsk /r implies that it is using /f
Term
what is the command to check c: drive for bad sectors?
Definition
chkdsk c: /r
Term
what is the command to check c: drive for bad sectors and to first dismount c: drive if necessary?
Definition
chkdsk c: /x /r
Term
what happens if you try to run chkdsk on c: drive while you are using c: drive?
Definition
you get an error message asking if you want to check the volume when you restart
Term
what is the chkdsk switch to see if the file readme.txt is fragmented?
Definition
chkdsk readme.txt
Term
can you use chkdsk to see if a file is fragmented on an NTFS computer?
Definition
no, it must be a FAT or FAT32 filesystem
Term
what is the redirection symbol to redirect the output and overwrite a file?
Definition
the redirection symbol is >
Term
what is the redirection symbol to redirect the output and append a file?
Definition
the redirection symbol is >>
Term
what is the redirection symbol to redirect the input from a file?
Definition
the redirection symbol is <
Term
what is the pipe symbol?
Definition
the pipe symbol is |
Term
what is the command to sort a file?
Definition
sort
Term
what is the command to view the contents of state.cap with the type command and then sort the output?
Definition
type state.cap | sort
Term
what is the command to sort the file state.cap without using the pipe symbol?
Definition
sort state.cap
Term
what is the command to sort the file state.cap in reverse order?
Definition
sort state.cap /r
Term
what is the output of the command sort state.cap +17?
Definition
you would get the error message input file specified two times
Term
what is the command to sort the file state.cap by the 17th character of each line?
Definition
sort state.cap /+17
Term
what happens to a file that is sorted with the sort command?
Definition
the file remains the same without being sorted
Term
what is the command to sort state.cap by the 17th character and save the output to a file called sortedcaps.txt?
Definition
sort state.cap /+17 > sortedcaps.txt
Term
does the sort command have a switch to specify where the sorted input is to be stored?
Definition
yes, sorted /o
Term
which is faster sort state.cap > sorted.txt or sort state.cap /o sorted.txt?
Definition
the /o option is faster than the > redirection
Term
what is the command to search for a text string in a file or files?
Definition
find
Term
what is the command to view the contents of personal.fil with the type command and search for the string "california"?
Definition
type personal.fil | find "california"
Term
what is the command to search for the string "california" in personal.fil without using the pipe symbol?
Definition
find "california" personal.fil
Term
what is the search switch to ignore the case?
Definition
find /i
Term
what is the command to display the number of times "smith" is found in personal.fil?
Definition
find "smith" personal.fil /c
Term
what is the command to display all lines and their line numbers that contain "smith" in personal.fil?
Definition
find "smith" personal.fil /c
Term
what is the command to display the count of the number of times it finds "smith" regardlesss of case in the file personal.fil?
Definition
find "smith" personal.fil /i /c
Term
what is the command to pause the display for one screen at a time?
Definition
more
Term
what is the command to view the tree output of c:\windows and pause the output?
Definition
tree c:\windows | more
Term
what is the command to view the file personal.fil and pause the output after each screenful?
Definition
more personal.fil or type personal.fil | more
Term
what is the command to view the file personal.fil by clearing the screen, start at line 23 and pause at each screen?
Definition
more personal.fil /c +23
Term
what is the command to display the dir command on c:\windows, sort the output, pause at each screen?
Definition
dir c:\windows | sort | more
Supporting users have an ad free experience!