Giter VIP home page Giter VIP logo

wsl-path-converter's Introduction

WSL path converter

Convert between Linux and Windows path in WSL (Windows Subsystem for Linux).

Installation

Either install the latest stable version hosted on PyPI:

pip install wsl-path-converter

Or clone the source repository and install the bleeding-edge version:

git clone https://github.com/lamyj/wsl-path-converter.git
cd wsl-path-converter
pip install .

If the latter case is run by a regular user, i.e. non-root, the wpc executable will be installed in ~/.local/bin.

Usage

This converter works with Windows path mounted in WSL, either through /etc/fstab or through the mount command: it must be used from within WSL to access the required information.

The executable is called wpc. To convert a Windows path to its Linux counterpart, run it with the -u option:

wpc -u C:\autoexec.bat

This is also valid using UNC paths (e.g. remote shares):

wpc -u \\samba.example.com\share

For the converse operation, i.e. convert a Linux path to its Windows counterpart, use the -w option:

wpc -w /mnt/c/autoexec.bat

If a path unambiguously belongs to either Windows or Linux, the conversion option can be skipped; all previous examples can be run without the option:

wpc C:\autoexec.bat
wpc \\samba.example.com\share
wpc /mnt/c/autoexec.bat

wsl-path-converter's People

Contributors

lamyj avatar valpogus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.