Ch.4 Manipulating Files and Directories Flashcards
what does command cp do?
Copy files and directories
what does command mv do
move/rename files and directories
what does mkdir do
create directories
what does rm do
remove files and directories
what does ln do
create hard and symbolic links
What do Wildcards allow us to do?
Select filenames based on patters of characters. Also called globbing.
What are the five wild cards?
- ? 3. [characters] 4. [!characters] 5. [[:class]]
Wildcard that matches any characters
*
Wildcard that matches any single character?
?
Wildcard that matches any character that is a member of the set characters?
[characters]
Wildcard that matches any character that is not a member of the set characters.
[!characters]
Wildcards that matches any character that is a member of the specified class
[[:class]]
What are the five most commonly used character classes?
- [:alnum:] 2. [:alpha;] 3. [:digit:] 4. [:lower:] 5. [:upper:]
Character class that matches any alphanumeric character
[:alnum:]
Character class that matches any alphabetic character
[:alpha:]
Character class that matches any numeral
[:digit:]
Character class that matches any lowercase letter
[:lower:]
Character class that matches any uppercase letter
[:upper:}
Wildcard that matches all files
*
Wildcard that matches any file beginning with “g”
g*
Wildcard that matches any filebegnning with “b” followed by any characters and ending with “.txt”
b*.txt