Results 1 to 3 of 3

Thread: Unexpected output from command ls -1

  1. #1
    Join Date
    Dec 2012
    Beans
    4

    Unexpected output from command ls -1

    Hello!

    I'm pretty new to Linux and using the command line.

    I'm using Ubuntu 12.04

    When I try to view the permission for a directory using ls -1, I just get a listing of the files and subdirectories in the folder. I thought ls -1 would give you output that might look something like this:

    -rw-rw-r-- 1 me me 1097374 Sep 26 18:48 some_file

    instead I get something like this:

    Desktop
    Downloads
    Music
    Pictures
    etc
    etc
    etc

    What am I doing wrong?

    Thanks!

  2. #2
    Join Date
    Jul 2007
    Location
    Poland
    Beans
    4,499
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Unexpected output from command ls -1

    Code:
    ls -l
    always check commands by using them with --help. Most show list of available options

    Code:
    $ ls --help
    
    -l                         use a long listing format
    
    -1                         list one file per line
    if your question is answered, mark the thread as [SOLVED]. Thx.
    To post code or command output, use [code] tags.
    Check your bash script here // BashFAQ // BashPitfalls

  3. #3
    Join Date
    Sep 2007
    Location
    Oklahoma, USA
    Beans
    2,378
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Unexpected output from command ls -1

    To get what you want, the "-l" option should be a lower-case L, not the numeral 1. Many fonts don't make the difference obvious visually.
    --
    Jim Kyle in Oklahoma, USA
    Linux Counter #259718
    Howto mark thread: https://wiki.ubuntu.com/UnansweredPo.../SolvedThreads

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
  •