I noticed that the Yosemite system has been creating files with names just "()" and "()!" in places where I recently made bash commands and want to know why. I can't even delete them use rm as after I press enter the cursor just moves to the next line like a unfinished command. I tried google but I guess the keywords () is too general to give me back a meaningful answer.

  • I have bash running every second (via cron) and certainly never had those files. You must be doing things wrong yourself. – 4ae1e1 Mar 21 '15 at 14:55
  • And of course you can't do rm (). You need to do rm '()' instead. rm () begins a function definition. – 4ae1e1 Mar 21 '15 at 14:56

Bash, by itself, will not create files like this. These files are probably created by you accidentally through incorrect typing/pasting of commands.

You can remove the files using rm:

rm '()' '()!'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .