Just asking how to delete these files (below is a sample). I tried rm -rf '*.upload'. but they are not deleted. Please help. thanks for sharing!



1 Answer 1


You don't need the " ' " around your wildcard. Just use rm -rf *.upload. And if they are just files you don't need the -r option.


Actually, because you have a "-" at the beginning of your file's name, the command line tries to interpret it as an option for the command, messing things ups. What you need to do is to select the file using ./ like so: rm ./*.upload. I can't explain more why it does that, but this should work.

  • thanks shadowMitia for quick response. but still does not delete, instead comment appear, by the way im already in root: # rm -rf *.upload rm: invalid option -- 1 Try rm ./-17e0ff18-1516c3dc17f--7fd17787933978606484871.upload' to remove the file -17e0ff18-1516c3dc17f--7fd17787933978606484871.upload'. Try `rm --help' for more information.
    – jonathan
    Commented Dec 9, 2015 at 21:43
  • rm -/*.upload rm: invalid option -- /
    – jonathan
    Commented Dec 9, 2015 at 21:54
  • My bad, spelling mistake. Should be a "." not a "-". Commented Dec 9, 2015 at 21:55
  • thanks! it work in------------> rm ./*.upload thanks again!
    – jonathan
    Commented Dec 9, 2015 at 21:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .