Alcatel-Lucent 6850-48 Manuale Supplementare
Managing System Files
File and Directory Management
OmniSwitch AOS Release 6 Switch Management Guide
September 2009
page 1-7
Using Wildcards
Wildcards allow you to substitute symbols (* or ?) for text patterns while using file and directory
commands. The asterisk (*) takes the place of multiple characters and the question mark character (?)
takes the place of single characters. More than one wildcard can be used within a single text string.
commands. The asterisk (*) takes the place of multiple characters and the question mark character (?)
takes the place of single characters. More than one wildcard can be used within a single text string.
Multiple Characters
An asterisk (*) is used as a wildcard for multiple characters in a text pattern. The following command will
list all entries in the current directory that end with the .log extension:
list all entries in the current directory that end with the .log extension:
-> ls *.log
Listing Directory /flash:
-rw 64000 Sep 21 19:49 swlog1.log
-rw 64000 Aug 12 19:06 swlog2.log
The following command lists all entries in the current directory that contain the i character.
-> ls *i*
Listing Directory /flash:
drw 2048 Aug 21 17:49 certified/
drw 2048 Aug 12 18:51 working/
-rw 31 Jul 29 2001 policy.cfg
drw 2048 Jul 28 12:17 switch/
Single Characters
The question mark (?) is used as a wildcard for a single character in a text pattern. The following
command will locate all entries containing swlog followed by any single character and the .log extension.
command will locate all entries containing swlog followed by any single character and the .log extension.
-> ls swlog?.log
Listing Directory /flash:
-rw 64000 Jul 21 19:49 swlog1.log
-rw 64000 Aug 12 19:06 swlog2.log
The single and multiple character wildcards can be used in combination. The following command lists all
entries containing the letter i followed by any two single characters.
entries containing the letter i followed by any two single characters.
-> ls *i??
Listing Directory /flash:
drw 2048 Aug 12 18:51 working/