Below I take advantage wildcards to do the following:
create 10 files named financial_reports1 through 10 and I do it with a single command
I use the ls command and use the * wildcard to only show files that end in .txt
I use the ls command again search for files named file and end with a single character
I use the ls command again to search for financial_reports 3 through 5
Using wildcards I create 3 directories and then make 3 files in each directory using the mkdir and touch commands in combination with wildcards, I then ls all 3 directories at once to show the files made.
Ticket: Utilize Wildcards in Commands
Summary
Learn how to utilize wildcards (
*,
?
,[...]
) in command-line commands for more flexible and efficient operations in a Unix-like operating system.Description
Objective: Understand the concept of wildcards in the command line and learn how to use them to perform various tasks more efficiently.
Scope:
*
,?
,[...]
)ls,
cp,
rm,
and moreLearning Tasks
Introduction to Wildcards:
*,
?
,[...]
).Using Wildcards in Commands:
ls,
cp,
mv,
andrm.
Best Practices:
Pitfalls to Avoid:
Hands-on Practice:
*
wildcard to list all.txt
files in a directory.?
to match single characters in file names.[...]
to list files that match specific character ranges.Troubleshooting:
Learning Goals
Priority