Issue
How can I remove grep: XXX: Is a directory
logs appearing when terminal is opened?
Why does these logs always appear?
Last login: Fri Jan 28 14:44:36 on ttys005
grep: Applications: Is a directory
grep: Desktop: Is a directory
grep: Documents: Is a directory
grep: Downloads: Is a directory
grep: Library: Is a directory
grep: Movies: Is a directory
grep: Music: Is a directory
grep: Pictures: Is a directory
grep: Postman: Is a directory
grep: Public: Is a directory
grep: Sites: Is a directory
grep: test: Is a directory
grep: work: Is a directory
~
❯
- zsh
- macOS Big Sur 11.6.2
Solution
One of your startup files such as .zprofile
is calling grep foo *
or similar. You need to find and remove that line or change it to grep -d
is it's useful. See section 2.2 in https://zsh.sourceforge.io/Guide/zshguide02.html for a list of zsh startup files to look in.
Answered By - Ed Morton Answer Checked By - Mary Flores (WPSolving Volunteer)