How do I list files that have only numeric names e.g
1111
2342
763
71
I have tried ls -l [0-9]* but this seems to bring all file names that
start with a digit and can have anything in their name after a digit.
First, turn on Bash's extglob option:
shopt -s extglob
Then use this pattern:
ls -l +([0-9])
Read more about extended pattern matching in the Bash Reference Manual.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With