MacOS – I have override a file in bin folder and this affect other programs

bashdeveloper-programfindermacosterminal

I was installing phpstorm. It use shortcut to use it in bin files as "ps"
to use "ps" in terminal to open phpstorm.

I didn't know that a file with that name already existed, and I found that when I use nodemon and other scripts, the phpstorm opens automatically and that there are "ps" in bin folder /usr/local/bin. That file was used with other programs as MAMP and NODEMON.

I want to recover that file any help ?

Best Answer

There's no default ps binary installed in /usr/local/bin. It is installed in /bin.

What happens here is that your /usr/local/bin/ps program seems to take precedence over your /bin/ps program because of your PATH settings.

In order to fix the problem, just delete your newly created shortcut in /usr/local/bin/ps. When you delete the file, the system should return to its former way of working.