Results 1 to 8 of 8

Thread: ls -a

  1. #1
    Join Date
    Jun 2008
    Location
    Singapore
    Beans
    160

    ls -a

    I recently upgraded to:
    uname -a
    Linux laptop 2.6.32-15-generic #22-Ubuntu SMP Tue Mar 2 02:23:29 UTC 2010 x86_64 GNU/Linux

    In a terminal, the command
    ls -a
    gives the same output as ls. I now have to type ls -all to get the complete listing. ls -a used to work fine. I don't understand what changed?

    Thanks for an explanation

    Regards

  2. #2
    Join Date
    Feb 2008
    Location
    Ann Arbor, MI
    Beans
    272
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: ls -a

    That seems very odd, I've never heard of it. Does your man ls reflect this change? also does "ls -A" work as expected?

  3. #3
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: ls -a

    Quote Originally Posted by frncz View Post
    Linux laptop 2.6.32-15-generic #22-Ubuntu SMP Tue Mar 2 02:23:29 UTC 2010 x86_64 GNU/Linux
    Is that Karmic or Lucid? (my Karmic machine is a li'l behind on updates, but is 2.6.31.19 generic).
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

  4. #4
    Join Date
    Jun 2008
    Location
    Singapore
    Beans
    160

    Re: ls -a

    This is lucid

    ls -a gives a listing of files and directories including hidden folders (ones starting with .), but no permission or owner information. ls by itself is the same as ls -a but without hidden directories.ls -A g
    ls -A is pretty much the same as ls -a, but seems to find a couple of extra hidden directories.

    ls -all gives all the details

    Regards
    Mike

  5. #5
    Join Date
    Mar 2009
    Location
    UK PLC
    Beans
    498
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: ls -a

    Quote Originally Posted by frncz View Post
    I recently upgraded to:
    uname -a
    Linux laptop 2.6.32-15-generic #22-Ubuntu SMP Tue Mar 2 02:23:29 UTC 2010 x86_64 GNU/Linux

    In a terminal, the command
    ls -a
    gives the same output as ls. I now have to type ls -all to get the complete listing. ls -a used to work fine. I don't understand what changed?

    Thanks for an explanation

    Regards
    What you've done is typed ls -lla which is the same as ls -la, ie the (l)ong listing of (a)ll files

    ls -a just gives (a)ll files

    ls -lla = ls -all = ls -lal

    Does this make sense?

    ls -all is basically ls with three switches the 'l' being duplicated.
    Last edited by lotharmat; March 9th, 2010 at 09:32 AM.
    I have a major malfunction!

  6. #6
    Join Date
    May 2008
    Location
    Tehran, Iran
    Beans
    97
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: ls -a

    Quote Originally Posted by lotharmat View Post
    What you've done is typed ls -lla which is the same as ls -la, ie the (l)ong listing of (a)ll files

    ls -a just gives (a)ll files

    ls -lla = ls -all = ls -lal

    Does this make sense?

    ls -all is basically ls with three switches the 'l' being duplicated.
    well said. to get the details, you need ls -l and to show all files including hidden directories you need ls -a. more info is available by "man ls"

  7. #7
    Join Date
    Jun 2008
    Location
    Singapore
    Beans
    160

    Re: ls -a

    Yes, indeed. Thank you. I stand corrected

    Regards

  8. #8
    Join Date
    Jan 2008
    Location
    Argentina
    Beans
    755
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: ls -a

    indeed. Flags composed of more than one character are determined by double hyphen:

    eg

    Code:
    --all (= -a in ls)
    --force-architecture
    etc.
    AMD Phenom II X3 720 Black Edition 2,8 GHz - GIGABYTE GA-MA770T-UD3P - 6 GB RAM Mushkin DDR3 1333 - ZOTAC GeForce 9800 GT 1 GB DDR3

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •