Using Wildcards in File Names and Directories

You've probably noticed that some of the folders contain dozens, if not hundreds of files. If your intention is to locate a specific file, you could type its name. Something like: ls /Users/bonnie/Applications/filename (where "filename" is, type the exact name of the file you're looking for). That's great, but what if you're looking for a file, and you only know part of the name, or you're looking for files that have the .mov extension? When that happens, UNIX lets you incorporate wildcards into the search statement. Wildcards let you add special characters into the search string that instruct UNIX to look for similar files. To list all file names ending with on, type ls *on. The Terminal window displays ...

Get Show Me Mac® OS X, v10.3 Panther™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.