Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

strange 'ls' output ?

0 views
Skip to first unread message

problems@gmail

unread,
Sep 6, 2008, 6:42:30 PM9/6/08
to
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.


Robert Riches

unread,
Sep 6, 2008, 6:51:33 PM9/6/08
to

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
spamt...@verizon.net
(Yes, that is one of my email addresses.)

Dan Espen

unread,
Sep 6, 2008, 7:14:54 PM9/6/08
to
Robert Riches <spamt...@verizon.net> writes:

> On 2008-09-06, problems@gmail <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

Mark Hobley

unread,
Sep 6, 2008, 7:27:30 PM9/6/08
to
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.

David W. Hodgins

unread,
Sep 6, 2008, 8:08:11 PM9/6/08
to
On Sat, 06 Sep 2008 18:42:30 -0400, <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 <--- !!

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

Andrew Halliwell

unread,
Sep 6, 2008, 9:00:58 PM9/6/08
to
Robert Riches <spamt...@verizon.net> wrote:
> On 2008-09-06, problems@gmail <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?
--
| spi...@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 |

Bill Marcum

unread,
Sep 6, 2008, 9:23:04 PM9/6/08
to
["Followup-To:" header set to comp.os.linux.misc.]

On 2008-09-06, problems@gmail <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
You are listing the contents of a directory that matches *imput*. Try
ls -d *imput*

trry...@gmail.com

unread,
Sep 9, 2008, 12:44:36 PM9/9/08
to

Try:
cd *imput*
cat CRGlog

0 new messages