What is the /bin/[ ‘[‘ File in OS X? – macOS File Explanation filemacos See the screen shot. There is the '[' file at /bin. What is the '[' file? What does it do? Best Answer This command is for comparing values, checking file types etc. Here's a man page: NAME test, [ -- condition evaluation utility SYNOPSIS test expression [ expression ] It's usually used like this: if [ -f /etc/passwd ] then echo "Yes" else echo "No" fi For more info, please read the man page ( man [ ). Related SolutionsMac Code Signing – /usr/bin/codesign from Mac 10.9 From OS X 10.9.1: /usr/bin/codesign Alternatively, grab it from your Recovery HD: diskutil mount Recovery\ HD hdiutil mount /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg sudo cp /Volumes/OS\ X\ Base\ System/usr/bin/codesign /usr/bin/codesign I recommend you do a permissions repair after copying. MacOS – How to restore a removed /bin/sh file Run this command to copy /bin/sh from the BaseSystem.dmg on the Recovery HD: diskutil mount Recovery\ HD && hdiutil mount /Volumes/Recovery\ HD/com.apple.recovery.boot/BaseSystem.dmg && sudo cp -p /Volumes/OS\ X\ Base\ System/bin/sh /bin/sh Also see How can I get back a system file after deleting it from my Mac? Related QuestionMacOS – Damaged preference file in /bin/shHow to close a file that you’ve opened with /usr/bin/openmacOS – Understanding `._xxx` Files in macOSMacOS – How to delete a stubborn file in the BinMacOS – I have override a file in bin folder and this affect other programsMacOS – Why /usr/local/bin is showing as a file in mac
Best Answer
This command is for comparing values, checking file types etc.
Here's a
man
page:It's usually used like this:
For more info, please read the man page (
man [
).