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

Re: Accented chars in filenames issue



On 25/06/11 17:15, Andrew McGlashan wrote:
> Hi,
> 
> Ralf Mardorf wrote:
>> $ echo test > \*
>> $ ls
>> *  Desktop  Downloads  hdsp.1
>>
>> Any idea how I can get rid of the file named *?
> 
> #  touch \* \&
> #  ls
> *  &
> #  find . -type f -name "\*" -print0|xargs -0 rm
> #  ls
> 
> 
> #  touch \* \&
> #  find . -type f -name "\&" -print0|xargs -0 rm
> #  ls
> *
> 
> 
> #  touch \* \&
> #  ls
> *  &
> #  find . -type f -name "\&" -print0|xargs -0 rm;ls
> *
> #  find . -type f -name "\*" -print0|xargs -0 rm;ls
> 
> 
> Cheers
> 

Bigger hammer....

scott@work:~/spec$ touch "*" "&"
scott@work:~/spec$ ls -A
*  &
scott@work:~/spec$ rm `ls -A`
rm: cannot remove `&': No such file or directory
scott@work:~/spec$ ls -a
.  ..


Cheers


-- 
I'm tired of this back-slapping "Isn't humanity neat?" bullsh#t. We're a
virus with shoes, okay? That's all we are.
~ Bill Hicks


Reply to: