指定されたパスが存在するかどうかを調べるTest-Pathコマンドレットだが、そのマニュアルを読むと、次のように「-PathType」というパラメータが用意されていることがわかる。 「Container」はディレクトリを、「Leaf」がファイルを意味していることがわかる。
Linux runs most commands from bin directories stored in your PATH variable. Adding the current directory to your PATH can be risky due to potential hijacking or typos. You can add the current ...