DEV Community

LG
LG

Posted on

Git bash for Windows : cwd

Print current working directory (hereinafter in – cwd) in Unix fashion :

pwd # C:\Users\<user-name>
Enter fullscreen mode Exit fullscreen mode

Print current working directory in Windows fashion :

cmd //c cd # e.g. /c/Users/<user-name>
Enter fullscreen mode Exit fullscreen mode

We could even write a small Node.js utility that checks type of OS & depending on the OS print its corresponding CWD :

<--- WILL INCLUDE THE CODE BASE LATER [LIVE:DRAFT so STAY TUNED] ---->

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay