Why I cannot rename filename of react component?

Viewed 147

I want to rename component filename to capital letter, but it doesn't allow me. In WSL terminal it says:

I try: mv mamaMia.jsx MamaMia.jsx

responds: mv: 'mamaMia.jsx' and 'MamaMia.jsx' are the same file

that file is in src/components/ of my application

Why is that? How can I rename?

1 Answers

In WSL, Windows volumes are mounted as case insensitive by default. You can either manually mount the volumes as case sensitive by following this blog for example, or trick the shell by using a temporary name as an extra step of your rename:

mv mamaMia.jsx MamaMia-temp.jsx
mv MamaMia-temp.jsx MamaMia.jsx
Related