4

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!

sample

-4776d77b-15138be20a5--7fe5564294743529948392.upload
-4776d77b-15138be20a5--7fe42113893139620106164.upload
-4776d77b-15138be20a5--7fe31607666159788442489.upload    
-4776d77b-15138be20a5--7fe25373299435776669057.upload
-4776d77b-15138be20a5--7fe1207318424670693308.upload
-4776d77b-15138be20a5--7fe06041124025289424195.upload
-4776d77b-15138be20a5--7fdf746591155901247528.upload
-4776d77b-15138be20a5--7fde2651489576923158462.upload
-4776d77b-15138be20a5--7fdd2531096796717880290.upload
-4776d77b-15138be20a5--7fdc2641652764933395437.upload
-4776d77b-15138be20a5--7fdb5818566181985823473.upload
-4776d77b-15138be20a5--7fda2806206050645309611.upload
-4776d77b-15138be20a5--7fd91895678442042719781.upload
-4776d77b-15138be20a5--7fd8342875353051911187.upload
-4776d77b-15138be20a5--7fd73596962611777373454.upload
-4776d77b-15138be20a5--7fd67990174325830266540.upload
-4776d77b-15138be20a5--7fd58525749935970194788.upload
-4776d77b-15138be20a5--7fd42881375718133436679.upload
-4776d77b-15138be20a5--7fd31679085579889731530.upload
-4776d77b-15138be20a5--7fd26119620848853649755.upload
-4776d77b-15138be20a5--7fd12842363350553049954.upload
-4776d77b-15138be20a5--7fd04812945245481337635.upload
-4776d77b-15138be20a5--7fcf9164012740031565326.upload
-4776d77b-15138be20a5--7fce4881094462944077013.upload
-4776d77b-15138be20a5--7fcd1734598108195804584.upload
-4776d77b-15138be20a5--7fcc4928484618899140497.upload
5

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.

EDIT:

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.