I have an image file that starts with a hyphen (-GFiZt0xnWY.jpg). When I run the command 'rm -f -GFiZt0xnWY.jpg' to delete this file, it gives the following error: rm: invalid option -- 'G'
How can I remove this file?
You can try one of the following commands to remove your file that starts with dash.
1. rm -- filename
rm -- -GFiZt0xnWY.jpg
2. rm ./filename
rm ./-GFiZt0xnWY.jpg