CS155

CS155: Introduction to Unix

Fall 2017

Wildcards

See this page as a slide show

Wildcards

CS155 Wildcards

Next

Vocabulary 
Punctuation*, ?, [], {}
Grammar 

Wildcards

Wildcards: Examples 1

Select all files ending in .txt

Select all files beginning with assignment

Select any file beginning with Homework_,

Wildcards: Examples 2

Select any file beginning with Homework_, followed by 1, 2, 3, or 4, and ending with .file

Select rod.flanders.file and tod.flanders.file

Select any file ending with .txt or .jpg. Note the comma!

Wildcards: In Use

Move all .txt files into the directory files

    % mv *.txt files

Remove all files beginning with HW, followed by a digit, and ending with .file

    % rm HW[0-9].file

List all files ending with .txt or .jpg

    % ls -l *.{txt,jpg} | more

Modified: 2017-01-22T22:49

User: Guest

Check: HTML CSS
Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building