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!



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.

| improve this answer | |
  • 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 Dec 9 '15 at 21:43
  • rm -/*.upload rm: invalid option -- / – jonathan Dec 9 '15 at 21:54
  • My bad, spelling mistake. Should be a "." not a "-". – ShadowMitia Dec 9 '15 at 21:55
  • thanks! it work in------------> rm ./*.upload thanks again! – jonathan Dec 9 '15 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.