04 Manipulating Files and Directories Flashcards
What does the wildcard * match?
Any characters
What does the wildcard ? match?
Any single character
What does the wildcard [characters] match?
Any characters of the set [characters]
What does the wildcard [!characters] match?
Any characters that don’t belong to the set [characters]
What does the wildcard [[:class:]] match?
Any characters that belong to the specified class
What does the special class [:alnum:] match?
Any alphanumeric characters
What does the special class [:alpha:] match?
Any alphabetic characters
What does the special class [:digit:] match?
Any number
What does the special class [:lower:] match?
Any lower-case characters
What does the special class [:upper:] match?
Any uppercase characters
Which files would the wildcard * match?
All files
Which files would the wildcard g* match?
Any files that begin with “g”
Which files would the wildcard b*.txt match?
Any files that begin with “b” and end with “.txt”
Which files would the wildcard Data??? match?
Any files beginning with “Data” followed by exactly 3 characters
Which files would the wildcard [abc]* match
Any files that begin with the lower-case letters “a”, “b”, or “c”
Which files would the wildcard BACKUP.[0-9][0-9][0-9] match?
Any files beginning with “BACKUP.” followed by exactly 3 numerals
Which files would the wildcard [[:upper:]]* match?
Any files beginning with an upper-case letter
Which files would the wildcard [![:digit:]]* match?
Any file not beginning with a numeral
Which files would the wildcard *[[:lower:]123]
Any file ending with a lower-case letter or a “1”,”2”,or”3”
How many directories can you create using a single instance of the mkdir command?
You can make multiple directories using mkdir in a single instance…mkdir dir1 dir2 dir3…etc
What would be the result of the following command:
cp item1 item2
File or directory Item1 would be copied to file or directory item2
What would be the result of the following command:
cp item1… dir1
File item1 would be copied into dir1
Describe the use of the following cp options:
-a / –archive
Copy files/dirs with their existing attributes, instead of the attributes of the user performing the copy
Describe the use of the following cp options:
-i / –interactve
Prompt for confirmation before copying (and possibly overwriting) the destination item.