Question

I have 200 files on a linux machine, each one's name is 100, 101, 102, 103 etc... I'd like to delete 100-150, how can it be done?

Was it helpful?

Solution

I have 200 files, each one's name is 100, 101, 102, 103 etc... I'd like to delete 100-150

You can say:

rm {100..150}

or

rm -f {100..150}     # -f would ignore nonexistent files, never prompt

OTHER TIPS

You can delete those by using range: rm -f {100..150}

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top