Page 1 of 1

Why does this happen ( ls command ) SOLVED

Posted: Wed Jan 30, 2013 11:39 am
by viking777
From a terminal in my /home/user directory:

Code: Select all

ls -a /usr/src/linux-headers-3.5.0-23/
./      crypto/         fs/       Kbuild   Makefile  scripts/   ubuntu/
../     Documentation/  include/  Kconfig  mm/       security/  usr/
arch/   drivers/        init/     kernel/  net/      sound/     virt/
block/  firmware/       ipc/      lib/     samples/  tools/

27 files and folders listed (including ./ and ../)


Code: Select all

cd /usr/src/linux-headers-3.5.0-23-generic


Code: Select all

/u/s/linux-headers-3.5.0-23-generic> ls -a
./              firmware@  Makefile@            source@
../             fs@        .missing-syscalls.d  .tmp_versions/
arch/           include/   mm@                  tools@
block@          init@      Module.symvers       ubuntu@
.config         ipc@       net@                 usr@
.config.old     Kbuild@    samples@             virt@
crypto@         Kconfig@   scripts/
Documentation@  kernel/    security@
drivers@        lib@       sound@

33 files and folders listed (which is the correct number confirmed by my file manager)

The extra 6 are the 4 dot files (which ls -a is supposed to show), 'source' which I can probably excuse because it is a broken symlink and Module.symvers which is a plain text file of 828kb. (It was actually one of the dot files that I was trying to find).

Re: Why does this happen ( ls command )

Posted: Wed Jan 30, 2013 1:51 pm
by xenopeek
Different directories man :D First you do a ls of /usr/src/linux-headers-3.5.0-23/, then you go to /usr/src/linux-headers-3.5.0-23-generic.

Re: Why does this happen ( ls command )

Posted: Wed Jan 30, 2013 2:02 pm
by viking777
Oh God, I give up - come round and shoot me will you. I looked at that problem for an hour or more, tried it all different ways, different shells, with and without sudo, even different distros - still I couldn't see it. Not only that, but at the time I posted it I hadn't had anything to drink for 24 hours (maybe that was the problem :lol: )

Thanks once again.