50 likes | 162 Vues
This guide delves into the intricacies of generating and matching file names in operating systems. We explore character classes, inclusive ranges, negations, and patterns used in file name generation. Key examples include using wildcards and character sets to filter and identify files effectively. This manual is designed for beginners and intermediate users who want to understand how to construct and interpret file matching expressions. Gain insights into practical applications with real-world examples demonstrating various commands and patterns for efficient file handling.
E N D
Lab 4Filename Generation ICS 431 – Operating System
File Name Generating Characters ? Matches any single character except a leading dot [ ] Defines a class of characters - Defines an inclusive range ! Negates the defined class * Matches zero or more characters except a leading dot
File Name Generation -- ? ? Matches any single character. $ ls –a . .. .zzrstrsturstuvrstzbbabbcyzzzayy 7A 9B 7a 12D Example $ echo ??? $ echo rst?
File Name Generation – [ ] [ ] Defines a class of characters from which one will be matched. $ ls –a . .. .zz 8B 11C 4D 6B Ant Cat Dog rstrstuvbacyz Example $ echo [abc]?? $ echo [1-9] [A-Z] $ echo [!A-Z]??
File Name Generation -- * • Matches zero or more characters except a leading dot (.). $ ls –a . .. .profile ab.dat abcd.dat abcdeabcde.data Example $ echo * $ echo .* $ echo .*dat $ echo *e