Can anyone tell me what is wrong in following way of file deletion which starts with "#".
Files in directory :
ola@ola:~/.scratch/hmm$ ls
five #four #one six #three #two
ola@ola:~/.scratch/hmm$
ola@ola:~/.scratch/hmm$ ls . |grep "#.*" |xargs rm -rf
ola@ola:~/.scratch/hmm$ ls
five six
ola@ola:~/.scratch/hmm$
Ps : Asking in reference of following question
ls
might list the files in several columns, and your regexp is not anchored to the beginning of the filename, either. Filenames containing whitespace will also be problematic.