[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Deleting weird-named files



Ed Curtis wrote:
>I recently tried to tar a directory and used the --exclude= tag. I wound
>up making a file called --exclude=*.jpg. I can't seem to delete this file
>even using '--exclude=*.jpg'. It keeps trying to take the -- as a command
>option. How can I delete this file?

What about -- ?
$ touch -- "--exclude=*.jpg"
$ ls -l  -- "--exclude=*.jpg"
-rw-rw-r--    1 alberto  alberto         0 abr  7 17:29 --exclude=*.jpg
$ rm -i -- "--exclude=*.jpg"
rm: ¿borrar `--exclude=*.jpg'? (s/n) y
$ ls -l  -- "--exclude=*.jpg"
ls: --exclude=*.jpg: No existe el fichero o el directorio$

-- 
-----------------------
Alberto Cabello Sánchez
alberto@unex.es
Servicio de Informática
924 289 318
-----------------------



Reply to: