"1" zero-length file created in home directory when term window opened

What is the zero-length file named "1" which is created in the home directory whenever a term window is opened?


It happens whether the window is opened from Terminal or iTerm. The date on the file is updated each time a new window is opened.


Any ideas what the purpose might be? Removing it is harmless; it is just recreated the next time a term window opens.

iMac 27″ 5K, macOS 10.15

Posted on Jul 31, 2020 6:22 AM

Reply

Similar questions

2 replies
Sort By: 

Jul 31, 2020 11:54 AM in response to Barney-15E

Absolutely right! But it took a little searching to find it. At the end of my .zshrc is:


if command -v pyenv >/dev/null 2&>1; then

eval "$(pyenv init -)"

fi


And that was what was doing it. I actually checked what the command did, and it was doing nothing worth mentioning. And then I looked closer at the line (which based on something in the pyenv init was installed by homebrew).


Note the redirection: It has 2&>1 rather than 2>&1.


Thanks for pointing me to the answer.


Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

"1" zero-length file created in home directory when term window opened

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.