Changes

Jump to: navigation, search
Filename Expansion
But this method is '''inefficient''': it requires a LOT of typing and knowing which filenames to include as separate arguments.<br>You can use a special character to indicate to the Bash shell to match all files that end with the extension ".txt":
[[Image:globbing-demo.png|thumb|right|400px|'''Globbing''' is the process of expanding filenames as separate arguments that match an argument that uses a '''wildcard symbol''' (such as '''*''').]]
<span style="font-family:courier;>'''ls *.txt'''<br>
a.txt b.txt c.txt 1.txt 2.txt 3.txt abc.txt work.txt</span>
''How Does this Work? (Process of Globbing)''
[[Image:globbing-demo.png|thumb|right|400px|'''Globbing''' is the process of expanding filenames as separate arguments that match an argument that uses a '''wildcard symbol''' (such as '''*''').]]
'''File globbing''' is a feature provided by the UNIX/Linux shell to represent multiple filenames by using special characters called wildcards with a single file name. A wildcard is essentially a symbol which may be used to substitute for one or more characters. Therefore, we can use wildcards for generating the appropriate combination of file names as per our requirement.<br>Reference: https://www.linuxnix.com/10-file-globbing-examples-linux-unix/
13,420
edits

Navigation menu