Unix Technical Forum

2 files have same dir & name ?!

This is a discussion on 2 files have same dir & name ?! within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> ls Ne* -l gives: -rw-r--r-- 1 root root 235 Jan 31 02:28 NewsLst -rw-r--r-- 1 root root 607 Jan ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-20-2008, 07:49 PM
no-top-post
 
Posts: n/a
Default 2 files have same dir & name ?!

ls Ne* -l gives:
-rw-r--r-- 1 root root 235 Jan 31 02:28 NewsLst
-rw-r--r-- 1 root root 607 Jan 31 06:16 NewsLst

The simplest explanation for me is that one's has a trailing
invisible char[s].
How would I investigate this further ?

== Chris Glur.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-20-2008, 07:49 PM
Phil Jackson
 
Posts: n/a
Default Re: 2 files have same dir & name ?!

no-top-post writes:

> ls Ne* -l gives:
> -rw-r--r-- 1 root root 235 Jan 31 02:28 NewsLst
> -rw-r--r-- 1 root root 607 Jan 31 06:16 NewsLst
>
> The simplest explanation for me is that one's has a trailing
> invisible char[s].
> How would I investigate this further ?


for f in *; do
echo "'${f}'"
done

Would show any spaces or funny chars.

Cheers,
Phil
--
"Solutions are not the answer."
- Richard Nixon, former U.S. President
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-20-2008, 07:49 PM
The Natural Philosopher
 
Posts: n/a
Default Re: 2 files have same dir & name ?!

no-top-post wrote:
> ls Ne* -l gives:
> -rw-r--r-- 1 root root 235 Jan 31 02:28 NewsLst
> -rw-r--r-- 1 root root 607 Jan 31 06:16 NewsLst
>
> The simplest explanation for me is that one's has a trailing
> invisible char[s].
> How would I investigate this further ?
>
> == Chris Glur.


I think "cat * | od -c | more" was one way we used to do this..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-20-2008, 07:49 PM
The Natural Philosopher
 
Posts: n/a
Default Re: 2 files have same dir & name ?!

no-top-post wrote:
> ls Ne* -l gives:
> -rw-r--r-- 1 root root 235 Jan 31 02:28 NewsLst
> -rw-r--r-- 1 root root 607 Jan 31 06:16 NewsLst
>
> The simplest explanation for me is that one's has a trailing
> invisible char[s].
> How would I investigate this further ?
>
> == Chris Glur.

Opps.. not cat *..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-20-2008, 07:49 PM
Ralf Fassel
 
Posts: n/a
Default Re: 2 files have same dir & name ?!

* no-top-post
| ls Ne* -l gives:
| -rw-r--r-- 1 root root 235 Jan 31 02:28 NewsLst
| -rw-r--r-- 1 root root 607 Jan 31 06:16 NewsLst
|
| The simplest explanation for me is that one's has a trailing
| invisible char[s].
| How would I investigate this further ?

ls | od -a

R'
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-20-2008, 07:49 PM
Stuart Winter
 
Posts: n/a
Default Re: 2 files have same dir & name ?!

On Tue, 30 Jan 2007 16:19:01 +0000, nntp@shellarchive.co.uk wrote:

>> The simplest explanation for me is that one's has a trailing
>> invisible char[s].
>> How would I investigate this further ?

>
> for f in *; do
> echo "'${f}'"
> done


ls -Q

[mozes@bladswede ii] $ ls -Q
"Moose" "Moose "

--
The Biscuit Appreciation Society : www.biscuit.org.uk
Experimental ARM Linux distribution: www.armedslack.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-20-2008, 07:50 PM
Thomas Overgaard
 
Posts: n/a
Default Re: 2 files have same dir & name ?!


no-top-post wrote :

> The simplest explanation for me is that one's has a trailing
> invisible char[s].


If you have copy/pasted from an xterm then I can see the last file has a
trailing whitespace.

> How would I investigate this further ?
>

ls -1 Ne* | hexdump -C

Ask eight slackers....
--
Thomas O.

This area is designed to become quite warm during normal operation.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com