Why does this happen ( ls command ) SOLVED

Forum rules
Before you post please read how to get help

Why does this happen ( ls command ) SOLVED

Postby viking777 on Wed Jan 30, 2013 11:39 am

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 ../)

But:
Code: Select all
cd /usr/src/linux-headers-3.5.0-23-generic


Then:
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).
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am

Linux Mint is funded by ads and donations.
 

Re: Why does this happen ( ls command )

Postby xenopeek on Wed Jan 30, 2013 1:51 pm

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.
User avatar
xenopeek
Level 21
Level 21
 
Posts: 15442
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Why does this happen ( ls command )

Postby viking777 on Wed Jan 30, 2013 2:02 pm

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.
Fujitsu Lifebook AH532. Intel i5 processor, 6Gb ram, Intel HD3000 graphics, Intel Audio/wifi. Realtek RTL8111/8168B Ethernet.Lubuntu 13.10,Ubuntu12.10 (Unity), Mint16 (Cinnamon), Manjaro (Xfce).
Image
User avatar
viking777
Level 14
Level 14
 
Posts: 5153
Joined: Mon Dec 01, 2008 11:21 am


Return to Scripts & Bash

Who is online

Users browsing this forum: No registered users and 1 guest