0

WSLでは大文字小文字だけ違うファイル作っても同一のものとして認識されるんだなーという話

WSL2が発表され(だいぶ前だけど)Windows10上で満足にlinuxでできることがやれると(個人的に)期待が高まる中、あらためてWSLの欠点を探してたところ気づいたものをちょっと書く。

記事にした理由

これが"WSL"の欠点や(原文ママ)って僕よりよっぽどできる友達に話題を投げかけたところ、「記事でも書いてみれば?」って言われたので...というわけで初投稿です。よろしくお願いします。

本題:WSLでは同一ファイル名だと大文字小文字の違いは認識されない

以下の画像の通りです。
WS000302.JPG

元々kt.txtというファイルがありまして、そこに

touch Kt.txt
touch KT.txt

と入力して同一ファイル名の大文字小文字の違いがあるファイルを作成しようとしました...が
このとおり元のkt.txtしか残りませんでした。

そもそもこれはWindowsの仕様

WS000303.JPG

このように同一ファイルとして扱われてしまいます。

仮想環境下ではどうか

CFD8W1pE.png

仮想環境下では同一ファイル名でも無事別物として認識されましたね...(そもそもlinuxではそうだからこそこの記事を書こうと思ったのです。)

まとめ:WSL2なら...?

というわけでWSLだと大文字小文字だけ違うファイル作っても同一のものとして認識されるんだなーという話でした。
linuxカーネルまでも備えるWSL2ならこんなことも起こらないでしょう...多分:thinking:
何かあればコメントのほうまでお願いします。喜びます。

参考

Windows 10のWindows Subsystem for Linux(WSL)を日常的に活用する

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away