remove strange file names

I once was asked in a job interview, how I would remove a file if this one started with a “-”

open your terminal

touch -myPictures

then try rm -myPictures and see what happens ;-)

so how would you do it?

there are two ways to do it (i am sure there are mores, but hey why bother?)

1) rm ./-myPictures

2) rm — -myPictures

Leave a Reply