I've accidentally redirected the output of a CSV file to my directory. How can I rm
only the files that start with a number, and leave the files that start with a letter intact?
mymachine$ ls
71.24 README.md 30 4.29
8 filter.sh 42.81 5.58
8.36 purchases.csv 1,208.8 100
16.7 2.56 21.78 269.96
Best Answer
Something like this should do it:
Remember you can always use
echo
with any globbing arguments prior to lettingrm
run with them.After running the
rm
command above: