How can I delete ordered numeric folders in Unix? For example, I want to delete folders from 5600 till 6500. However, I do not want to delete for example the folder 599 (which is inside those numbers because they are actually ordered alphabetically).
Any ideas?
You can use
?as a single-character wildcard. So this might work:As always, it’s a good idea to use
echofirst to make sure your wildcard matches the right set of names: