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)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More