What if you could find or manage hundreds of files with just a few simple symbols?
Why File globbing (wildcards *, ?, []) in Linux CLI? - Purpose & Use Cases
Imagine you have hundreds of files in a folder and you want to find or work with only some of them, like all text files or files starting with 'report'. Doing this by opening each file manually is like searching for a needle in a haystack.
Manually opening or listing files one by one is slow and tiring. You might miss some files or make mistakes typing their names. It's easy to get overwhelmed and waste time.
File globbing lets you use simple symbols like * and ? to quickly match many files at once. It's like using a smart filter that finds exactly what you want without typing every name.
ls report1.txt ls report2.txt ls report3.txt
ls report*.txt
File globbing makes handling groups of files fast and error-free, saving you time and effort.
When cleaning up old photos, you can delete all files ending with .jpg using one command instead of deleting each photo one by one.
Manual file handling is slow and error-prone.
File globbing uses wildcards to match many files easily.
This speeds up tasks like searching, copying, or deleting files.