From mboxrd@z Thu Jan 1 00:00:00 1970 From: khm@sciops.net (Kurt H Maier) Date: Thu, 19 Oct 2017 16:27:28 -0700 Subject: [TUHS] /bin/true (was basic tools / Universal Unix) In-Reply-To: <87a82674-0b26-f275-e9a8-363b63659a38@tnetconsulting.net> References: <009a01d348e9$e3dce200$ab96a600$@ronnatalie.com> <20171019212353.bOjzh%steffen@sdaoden.eu> <741bfdf1-c816-085e-b9ac-c301c8c2d974@case.edu> <87a82674-0b26-f275-e9a8-363b63659a38@tnetconsulting.net> Message-ID: <20171019232728.GB8086@wopr> On Thu, Oct 19, 2017 at 05:14:49PM -0600, Grant Taylor via TUHS wrote: > On 10/19/2017 05:00 PM, Dave Horsfall wrote: > > Good luck with "cd"... > > There's nothing that states that the executable effectively do anything. It's still useful. Minimal example: [khm at pc ~]$ (exec cd /); echo $? 0 [khm at pc ~]$ (exec cd /nosuchpath); echo $? /usr/bin/cd: line 2: cd: /nosuchpath: No such file or directory 1 You can use this to dodge some of the crappier shells' problems, sometimes, or to test for directory accessibility in a clean environment. I've run across it in the wild on occasion, even if I don't really play this sort of game myself. khm