Re: 2 files, same name, same dir
On Sat, 22 Oct 2016, Nick Hollandwrote: > (and it wouldn't surprise me if Linux "saves" you from this error, and > it would just make me hate it all the more) No need to kick the poor penguin... > $ uname > Linux > $ mkdir /tmp/test > $ cd $_ > $ touch "pi.c" > $ touch "pi.c " > $ ls | hexdump -C > 70 69 2e 63 0a 70 69 2e 63 20 0a |pi.c.pi.c .| > 000b
Re: 2 files, same name, same dir
I can probably blame it on the Joe editor, which leaves trailing spaces on lines in files too. I wrote a program once to strip them off, probably doesn't bother anybody else. When you save a file it prompts with a (previous) filename with the cursor at the end, bumping the spacebar then would do it, I've hit other characters by accident and had those end up in filenames. I've been using Joe for ~20 years. But a trailing space on a filename, after the extension, is pointless to keep. Probably featureitis to build in looking for them though. On 10/22/16, Alan Coreywrote: > Bingo, a trailing space. I would have thought that would get trimmed > off somehow. I don't normally put spaces in filenames, I must have > fat-fingered something. But I see no reason to keep trailing spaces. > > -rw-r--r-- 1 alan wheel25549 Oct 22 10:55 pi.c\$ > -rw-r--r-- 1 root wheel25152 Oct 22 00:07 pi.c \$
Re: 2 files, same name, same dir
On 10/22/16 11:26, Alan Corey wrote: > Bingo, a trailing space. I would have thought that would get trimmed > off somehow. I don't normally put spaces in filenames, I must have > fat-fingered something. But I see no reason to keep trailing spaces. um. Unix. File names can have almost any character, and they are all equally valid in all places in the file name. This ain't CP/M or its derivatives (like Windows). (and it wouldn't surprise me if Linux "saves" you from this error, and it would just make me hate it all the more) Nick. > > -rw-r--r-- 1 alan wheel25549 Oct 22 10:55 pi.c\$ > -rw-r--r-- 1 root wheel25152 Oct 22 00:07 pi.c \$ > >> Likely one of them has space or so in it's name. Use >> >> $ ls -l | vis -l >> >> or some variation. >> >> -Otto
Re: 2 files, same name, same dir
Bingo, a trailing space. I would have thought that would get trimmed off somehow. I don't normally put spaces in filenames, I must have fat-fingered something. But I see no reason to keep trailing spaces. -rw-r--r-- 1 alan wheel25549 Oct 22 10:55 pi.c\$ -rw-r--r-- 1 root wheel25152 Oct 22 00:07 pi.c \$ > Likely one of them has space or so in it's name. Use > > $ ls -l | vis -l > > or some variation. > > -Otto > -- Credit is the root of all evil. - AB1JX
Re: 2 files, same name, same dir
On Sat, Oct 22, 2016 at 11:08:47AM -0400, Alan Corey wrote: > This is in 5.7 but I don't understand how it could happen (and I never > noticed it before). Two files in the same directory with the same > name, different owners. Last night I was noticing that my edits to my > program sometimes weren't taking effect, this seems to be why. Ideas? > I can delete the wrong one from mc probably, I just wanted to mention > it. > > -rw-r--r--1 alan wheel25549 Oct 22 10:55 pi.c > -rw-r--r--1 root wheel25152 Oct 22 00:07 pi.c > freebie# whoami > root > > > -- > Credit is the root of all evil. - AB1JX Likely one of them has space or so in it's name. Use $ ls -l | vis -l or some variation. -Otto
Re: 2 files, same name, same dir
Alan Coreywrites: > This is in 5.7 Boo. > but I don't understand how it could happen (and I never > noticed it before). Two files in the same directory with the same > name, different owners. Last night I was noticing that my edits to my > program sometimes weren't taking effect, this seems to be why. Ideas? > I can delete the wrong one from mc probably, I just wanted to mention > it. > > -rw-r--r--1 alan wheel25549 Oct 22 10:55 pi.c > -rw-r--r--1 root wheel25152 Oct 22 00:07 pi.c > freebie# whoami > root Are you sure that the names are exactly the same? env LC_ALL=C ls, hexdump, etc -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE