Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chevyorange

macrumors member
Original poster
Sep 26, 2004
82
19
Washington State
My MacBook Pro has this Terminal window that opens and appears to be doing "something" but I can't tell what it is.

Today, I tried to download something and it said the disk was full, despite there being plenty of space.

I reinstalled the OS and the storage error is gone but the Terminal keeps opening (see attachment). I know a little Unix but can't quite tell why this is trying to do?
 

Attachments

  • Screen Shot 2022-01-03 at 12.37.27 PM.png
    Screen Shot 2022-01-03 at 12.37.27 PM.png
    200.4 KB · Views: 174
  • Screen Shot 2022-01-03 at 12.36.19 PM.png
    Screen Shot 2022-01-03 at 12.36.19 PM.png
    2.3 MB · Views: 115
Did you check what is being auto started on login?
Looks to me the "something" tried to modify the .zshrc file and this file is now corrupted. This is resource file which sets up environment for whatever you were installing.
But after that I am confused. "it said disk was full"? What is "it" here? If the "something" you were installing, then likely it did not have permissions to write to target and that caused "it" to think disk is full. Granting permission (Disk access) would be solution, but can get complicated how to do that.
However, why the fact that "it" said disk is full required system reinstall is confusing. Was system reporting "disk full"? That would be lot more problem and reinstall could help.
Either way, something went wrong on this system and is suspicious.
You can delete the .zshrc file (manually from command line or you need to show hidden files in Finder). That may, however, break some other programs if they have environment setup there.
 
I can't comment on the disk full issue, but I agree that your .zshrc file has been left in a wonky state.

Something is starting a shell (could be anything - something in your Launch Agents perhaps). When zsh starts, it runs the commands in .zshrc. One of the commands in your .zshrc is to run the nano text editor on the .zshrc file. And that's what you're seeing in the terminal window, the nano text editor editing the .zshrc file.

I can't imagine what inserted that stuff into your .zshrc file.
 
Any chance you installed Oh My Zsh? https://ohmyz.sh/

I know its installation modifies the .zshrc file. I seem to remember they created subdirectories for their modules and other stuff. Maybe that ~/.zsh/misc directory is theirs. If I'm brave enough and you're still struggling, I will install it and see if I get some additions to .zshrc similar to what you have.
 
Well, I haven't installed anything new on this laptop, it only popped up on the last MacOS update. Monterey 12.1.

I didn't get a message to reinstall the OS - it was the last gasp at fixing it myself.

If I try to download some stuff (docs, whatever) it says the system disk is full but I have 47GB left.

I'm considering a clean install now - unless someone can give me better advice. :)
 
So - I went ahead and did a clean install. iCloud had all my data and I just had to reinstall some apps. I hadn't done a clean install in two OSs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.