Weird CLI behaviour.

Colin Watson cjwatson at ubuntu.com
Mon Dec 2 08:22:30 UTC 2019


On Mon, Dec 02, 2019 at 04:55:21PM +1100, Owen Thomas wrote:
> On Mon, 2 Dec 2019 at 13:35, Owen Thomas <owen.paul.thomas at gmail.com> wrote:
> > owen at owen-Latitude-E5570:~/NetbeansProjects/CliqueSpace/Current/trunk/RelayNeuron/dist$
> > ls
> > lib  README.TXT  RelayNeuron.jar
> >
> > Great! I then instruct my Netbeans installation to clean and build my
> > project. and try again:
> >
> > owen at owen-Latitude-E5570:~/NetbeansProjects/CliqueSpace/Current/trunk/RelayNeuron/dist$
> > ls
> > <nothing appears>
> >
> > That's odd I say to myself. So I try to be a little trickier:
> >
> > owen at owen-Latitude-E5570:~/NetbeansProjects/CliqueSpace/Current/trunk/RelayNeuron/dist$
> > ls ../dist/
> > lib  README.TXT  RelayNeuron.jar
> 
> The possibility that the dist directory could be deleted and then recreated
> when I clean and build my project could have something to do with what I
> observe. Still, even if it did, I don't think it should.

It sounds like exactly that to me.  The current working directory is
basically maintained by reference rather than by its full path, and so
if you remove it you get this sort of effect.  (Changing that would
likely break other things.)

One problem that would be fixable, though, is that you are getting empty
output from "ls" (and even a zero exit status, when I test this
locally!) rather than an error message.  That seems to me like a clear
bug in coreutils and I think should be reported as such.

-- 
Colin Watson                                       [cjwatson at ubuntu.com]




More information about the ubuntu-users mailing list