Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [Closed] Cannot create directory with name as an existing file (Read 177 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Closed] Cannot create directory with name as an existing file

I tried the following commands:
Code: [Select]
touch  file 
mkdir file

got this error:
Code: [Select]
mkdir: cannot create directory ‘file’: File exists

I tried GUI and got the same error in Thunar and zzzFM (spaceSM fork).

Code: [Select]
inxi -b
System:
  Host: speedy Kernel: 6.6.36-1-lts arch: x86_64 bits: 64
  Desktop: i3 v: 4.23 Distro: Artix Linux
Machine:
  Type: Laptop System: Dell product: Latitude E5440 v: 00
    serial: <superuser required>
  Mobo: Dell model: 0XFRKC v: A00 serial: <superuser required> BIOS: Dell
    v: A24 date: 06/13/2019
Battery:
  ID-1: BAT0 charge: 29.3 Wh (100.0%) condition: 29.3/66.6 Wh (44.0%)
CPU:
  Info: dual core Intel Core i3-4030U [MT MCP] speed (MHz): avg: 1532
    min/max: 800/1900
Graphics:
  Device-1: Intel Haswell-ULT Integrated Graphics driver: i915 v: kernel
  Device-2: Microdia Integrated Webcam driver: uvcvideo type: USB
  Display: server: X.Org v: 21.1.13 with: Xwayland v: 24.1.0 driver: X:
    loaded: modesetting failed: vesa dri: crocus gpu: i915
    resolution: 1366x768~60Hz
  API: OpenGL Message: Unable to show GL data. glxinfo is missing.
Network:
  Device-1: Qualcomm Atheros AR9485 Wireless Network Adapter driver: ath9k
Drives:
  Local Storage: total: 238.47 GiB used: 39.65 GiB (16.6%)
Info:
  Memory: total: 4 GiB available: 3.74 GiB used: 1.48 GiB (39.5%)
  Processes: 186 Uptime: 1h 7m Shell: Bash inxi: 3.3.35
Keep it Simple. Simple is Secure, Simple is Beautiful.

Re: Cannot create directory with name as an existing file

Reply #1
got this error:
Code: [Select]
mkdir: cannot create directory ‘file’: File exists
In linux filesystems (in extX at least) there cannot coexist a file and a directory with the same name.

https://en.wikipedia.org/wiki/Everything_is_a_file
https://askubuntu.com/a/1073803

 

Re: Cannot create directory with name as an existing file

Reply #2
years of using linux and never tried this, thnx for refreshing my memory.
Keep it Simple. Simple is Secure, Simple is Beautiful.