Getting rid of no name file

I have a dir which has a file with no name, just blank in the name column. How can i remove it?
I tried doing
find . -user foo -exec /bin/rm -f {} \;
but no luck

thanks
neptunaAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
ahoffmannConnect With a Mentor Commented:
assuming your ls -l shows the file like:

   -rw-rw----   1 user group   1800 May  8 14:42

(beside lot of others), then use something like:

   \rm `ls -l|awk '/14:42/{print $NF}'`

replace the pattern "14:42" by something that matches the line uniquely.

NOTE: test the command in backticks **before** using its output as parameter for rm, for example like:

   ls -l|awk '/14:42/{print $NF}'|od -c
0
 
waynezhuCommented:
try

rm " "*
 
and/or

rm "        "*

# i.e., double quoted space/tab (whitespaces) followed by * sign
0
 
neptunaAuthor Commented:
of course, awk to the rescue
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.