ls *.txt

Category: Navigation & Directory

ls *.txt

List only files matching a glob pattern (e.g., .txt files)

Lists only files matching the pattern *.txt — the * is a wildcard matching any characters. You can change *.txt to any pattern.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.