13,420
edits
Changes
→Ambiguous Filename Expansion
You issued the '''ls''' command to view all of the files contained in your current directory:
<span style="font-family:courier;>'''ls'''<br>
If you wanted to list just text files (i.e. files with the extension ".txt"), one way is to issue a command and specify each file pathname as a separate argument:
<span style="font-family:courier;>'''ls a.txt b.txt c.txt 1.txt 2.txt 3.txt abc.txt work.txt'''<br>
But there is no need to type all of those file pathnames as separate arguments. You can use a special character to indicate to the Bash shell to match all files that end with the extension ".txt":
<span style="font-family:courier;>'''ls *.txt'''<br>