You are not logged in.

#1 2024-04-13 14:33:08

Xzoras
Member
Registered: 2024-04-13
Posts: 4

(Resolved) How did I get 2 files with the same path and name?

Idk how I managed to create 2 files both with the name of nvme_start on my ~ directory.
I was doing a dd at the time, so maybe it has something to do with dd?

I’ve tried using dd with both root and another user but cannot seem to replicate what happened.

“ls -l” gives me
-rw-r—r— 1 root root 134217728 Mar 4 01:23 nvme_start
-rw-r—r— 1 general users 134217728 Mar 4 01:10 nvme_start

Last edited by Xzoras (2024-04-30 15:19:47)

Offline

#2 2024-04-13 14:46:38

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: (Resolved) How did I get 2 files with the same path and name?

ls -lib

Still the same?

Offline

#3 2024-04-14 08:04:53

Xzoras
Member
Registered: 2024-04-13
Posts: 4

Re: (Resolved) How did I get 2 files with the same path and name?

Oh i tried ls -lib and got numbers at the front

21495998 for the root one
21496782 for the general one

I see, the -i gave the index numbers

Last edited by Xzoras (2024-04-14 08:05:58)

Offline

#4 2024-04-14 08:10:38

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: (Resolved) How did I get 2 files with the same path and name?

inodes, yes - did the "-b" reveal any non-printable characters?
What kind of filesystem is this?

Offline

#5 2024-04-14 09:59:48

fmc000
Member
Registered: 2020-05-12
Posts: 52

Re: (Resolved) How did I get 2 files with the same path and name?

try this:

ls -la > /tmp/output
vim /tmp/output

Once inside vim try:

set list

You should see the differences.


Linux user since 1996. Currently running Arch on an I7 11th gen laptop with root on zfs.

Offline

#6 2024-04-14 12:10:00

Xzoras
Member
Registered: 2024-04-13
Posts: 4

Re: (Resolved) How did I get 2 files with the same path and name?

@seth no, there were no other differences.
I could see the ‘\ ‘ space character now tho of another directory.

@fmc000 ls -al gave the same thing
set list just added a bunch of $ at the end.
So I tried :!xxd and it showed that both had exactly the same name just different owners like ls -al originally pointed out

Wait nvm I realised what was wrong, I’m dumb, I was typing from my phone and I never copied from my computer cause it was only running in console, the name of the one for root is nmve

Last edited by Xzoras (2024-04-14 12:13:09)

Offline

#7 2024-04-14 12:16:51

Xzoras
Member
Registered: 2024-04-13
Posts: 4

Re: (Resolved) How did I get 2 files with the same path and name?

I guess I should just download a desktop environment and buy myself a mouse so that I can at least realise the typo next time

Offline

#8 2024-04-14 14:56:55

seth
Member
Registered: 2012-09-03
Posts: 51,739

Re: (Resolved) How did I get 2 files with the same path and name?

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB