Ignore Files & Folders
You can ignore some files and folders by setting the environment variable IGNORE
to an ignore pattern. By default everything is shown.
Pattern | Description |
---|---|
* | Matches everything (including nothing) |
? | Matches any single character |
[seq] | Matches any character in seq |
[!seq] | Matches any character not in seq |
Examples
-
*[ab].txt
hides all files or folder ending with.txt
and starting witha
orb
. -
.*
hides all files or folder starting with a dot . -
[a-zA-Z0-9]*
hides all files or folder starting with a letter or number. -
[!a-zA-Z0-9]*
hides all files or folder not starting with a letter or number. -
report-???.pdf
hidesreport-001.pdf
,report-123.pdf
but notreport-1.pdf
.
info
These are not regular expressions but shell patterns used in fnmatch
.