I stupidly used my terminal to create a symbolic link typing this:
sudo ln -s /bin/tcsh tcsh
And now I need to delete it. I tried
sudo rm tcsh
but when I authenticate it tells me:
override rwxr-xr-x root/wheel restricted,compressed for tcsh?
and even if I type y and press enter it tells me:
rm: tcsh: Operation not permitted.
Is there anything I can do to fix this?
sudo rm tcsh
command? What was the current directory when you executedsudo ln -s /bin/tcsh tcsh
? – techraf Dec 22 '16 at 02:15sudo find / -name tcsh -type l 2> /dev/null
– techraf Dec 22 '16 at 02:44sudo find / -name tcsh 2> /dev/null
. Comparing both results you can distinguish soft links and real tcsh execs: the real tcsh (or a copy of it somewhere else won't appear in the first output). Upgrading to Sierra will not really help. – klanomath Dec 22 '16 at 03:07/bin/tcsh
file. Apple released a system that prevents it, so you (or some malware, or some buggy software) don't mess it. Possibility (2) You have created a link, which has zero influence on anything. And then tried to delete a protected/bin/tcsh
file. That's all. – techraf Dec 22 '16 at 03:37rm
and other commands - at least what you have done will remain in the shell history. – techraf Dec 22 '16 at 03:42