2 ms·
Yeah, this is probably because macOS has done something very, very weird, and added an executable `/usr/bin/command` to the system. These are the contents on th
by pxc 5y ago
Yeah, this is probably because macOS has done something very, very weird, and added an executable `/usr/bin/command` to the system. These are the contents on the old MacBook I have for work right here:
#!/bin/sh
# $FreeBSD: src/usr.bin/alias/generic.sh,v 1.2 2005/10/24 22:32:19 cperciva Exp $
# This file is in the public domain.
builtin `echo %{0##*/} | tr \[:upper:] \[:lower]` ${1+"$@"}
If you have SIP disabled, try renaming `/usr/bin/command` to `/usr/bin/command.wtf` and see if `tcsh` still acts like there's a `command` command.
- eddieh 5y agoI do have SIP disabled for DYLD_LIBRARY_PATH and a handful of other things, but macOS still says /usr/bin/command is on a read-only file system. [edit] Not hard to remount root as writable $ sudo mount -uw / Password: $ sudo mv /usr/bin/command /usr/bin/command.save $ tcsh % command -v command command: Command not found. % command -V command command: Command not found. % Now reversing the changes % exit exit $ sudo mv /usr/bin/command.save /usr/bin/command $ sudo mount -ur / mount_apfs: volume could not be mounted: Invalid argument mount: / failed with 66 Looks like I'll have to reboot to get the read-only state back.