strange 'ls' output ? - Slackware

This is a discussion on strange 'ls' output ? - Slackware ; I've often been confused at some installations, showing descendant-dir contents for 'ls', but *this* looks like an error:- # ls *imput* -l total 568 -rw-r--r-- 1 root root 753 Jun 25 2006 CRGlog drwxr-xr-x 5 root root 4096 May 10 ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: strange 'ls' output ?

  1. strange 'ls' output ?

    I've often been confused at some installations, showing
    descendant-dir contents for 'ls', but *this* looks like an error:-

    # ls *imput* -l
    total 568
    -rw-r--r-- 1 root root 753 Jun 25 2006 CRGlog <--- !!
    drwxr-xr-x 5 root root 4096 May 10 2001 simp_hardware
    -rw-r--r-- 1 root root 568564 Jun 25 2006 simp-hardware.tar.gz
    # cat CRGlog
    cat: CRGlog: No such file or directory
    # type CRGlog
    bash: type: CRGlog: not found
    # type Pert
    Pert is /usr/local/bin/Pert

    Please explain.

    == Chris Glur.



  2. Re: strange 'ls' output ?

    On 2008-09-06, problems@gmail wrote:
    > I've often been confused at some installations, showing
    > descendant-dir contents for 'ls', but *this* looks like an error:-
    >
    > # ls *imput* -l
    > total 568
    > -rw-r--r-- 1 root root 753 Jun 25 2006 CRGlog <--- !!
    > drwxr-xr-x 5 root root 4096 May 10 2001 simp_hardware
    > -rw-r--r-- 1 root root 568564 Jun 25 2006 simp-hardware.tar.gz
    > # cat CRGlog
    > cat: CRGlog: No such file or directory
    > # type CRGlog
    > bash: type: CRGlog: not found
    > # type Pert
    > Pert is /usr/local/bin/Pert
    >
    > Please explain.


    Explain what?

    Perhaps there is some whitespace at the end of the file name
    that appears to include the substring "CRGlog". How about
    doing

    type *CRGlog*

    --
    Robert Riches
    spamtrap42@verizon.net
    (Yes, that is one of my email addresses.)

  3. Re: strange 'ls' output ?

    Robert Riches writes:

    > On 2008-09-06, problems@gmail wrote:
    >> I've often been confused at some installations, showing
    >> descendant-dir contents for 'ls', but *this* looks like an error:-
    >>
    >> # ls *imput* -l
    >> total 568
    >> -rw-r--r-- 1 root root 753 Jun 25 2006 CRGlog <--- !!
    >> drwxr-xr-x 5 root root 4096 May 10 2001 simp_hardware
    >> -rw-r--r-- 1 root root 568564 Jun 25 2006 simp-hardware.tar.gz
    >> # cat CRGlog
    >> cat: CRGlog: No such file or directory
    >> # type CRGlog
    >> bash: type: CRGlog: not found
    >> # type Pert
    >> Pert is /usr/local/bin/Pert
    >>
    >> Please explain.

    >
    > Explain what?
    >
    > Perhaps there is some whitespace at the end of the file name
    > that appears to include the substring "CRGlog". How about
    > doing
    > type *CRGlog*


    To see trailing spaces:

    ls -lQ

    (names will be quoted)

    Also helps to use the bash shells' file name
    completion. Type:

    ls -l CR

    then hit tab before hitting return


  4. Re: strange 'ls' output ?

    problems@gmail wrote:

    > # ls *imput* -l


    I don't know what you are trying to do above.

    ls -q

    That will show question marks for any unprintable characters in the filename.

    Mark.

    --
    Mark Hobley,
    393 Quinton Road West,
    Quinton, BIRMINGHAM.
    B32 1QE.

  5. Re: strange 'ls' output ?

    On Sat, 06 Sep 2008 18:42:30 -0400, wrote:

    > I've often been confused at some installations, showing
    > descendant-dir contents for 'ls', but *this* looks like an error:-
    >
    > # ls *imput* -l
    > total 568
    > -rw-r--r-- 1 root root 753 Jun 25 2006 CRGlog <--- !!


    It's showing you the contents of a directory that hast imput in it's name.

    Compare the above to "ls -ld *imput*"

    Regards, Dave Hodgins

    --
    Change nomail.afraid.org to ody.ca to reply by email.
    (nomail.afraid.org has been set up specifically for
    use in usenet. Feel free to use it yourself.)

  6. Re: strange 'ls' output ?

    Robert Riches wrote:
    > On 2008-09-06, problems@gmail wrote:
    >> I've often been confused at some installations, showing
    >> descendant-dir contents for 'ls', but *this* looks like an error:-
    >>
    >> # ls *imput* -l
    >> total 568
    >> -rw-r--r-- 1 root root 753 Jun 25 2006 CRGlog <--- !!
    >> drwxr-xr-x 5 root root 4096 May 10 2001 simp_hardware
    >> -rw-r--r-- 1 root root 568564 Jun 25 2006 simp-hardware.tar.gz
    >> # cat CRGlog
    >> cat: CRGlog: No such file or directory
    >> # type CRGlog
    >> bash: type: CRGlog: not found
    >> # type Pert
    >> Pert is /usr/local/bin/Pert
    >>
    >> Please explain.

    >
    > Explain what?
    >
    > Perhaps there is some whitespace at the end of the file name
    > that appears to include the substring "CRGlog". How about
    > doing


    Nope, even simpler than that, if you read his post again...
    ls *imput* -l
    So he's listing a directory that contains the string "imput" and then
    trying to type, cat, etc things in current working directory, not the
    *imput* one.

    Who IS this idiot?
    --
    | spike1@freenet.co.uk | "I'm alive!!! I can touch! I can taste! |
    | Andrew Halliwell BSc | I can SMELL!!! KRYTEN!!! Unpack Rachel and |
    | in | get out the puncture repair kit!" |
    | Computer Science | Arnold Judas Rimmer- Red Dwarf |

  7. Re: strange 'ls' output ?

    On Sep 6, 5:42 pm, problems@gmail wrote:
    > I've often been confused at some installations, showing
    > descendant-dir contents for 'ls', but *this* looks like an error:-
    >
    > # ls *imput* -l
    > total 568
    > -rw-r--r-- 1 root root 753 Jun 25 2006 CRGlog <--- !!
    > drwxr-xr-x 5 root root 4096 May 10 2001 simp_hardware
    > -rw-r--r-- 1 root root 568564 Jun 25 2006 simp-hardware.tar.gz
    > # cat CRGlog
    > cat: CRGlog: No such file or directory
    > # type CRGlog
    > bash: type: CRGlog: not found
    > # type Pert
    > Pert is /usr/local/bin/Pert
    >
    > Please explain.
    >
    > == Chris Glur.


    Try:
    cd *imput*
    cat CRGlog

+ Reply to Thread