Skip to content

How to get the filesystem of $PWD? #21321

Closed Answered by RokeJulianLockhart
RokeJulianLockhart asked this question in Q&A
Discussion options

You must be logged in to vote

https://github.com/orgs/PowerShell/discussions/21321?sort=top#discussion-6342435

Per @rhubarb-geek-nz,'s damn comprehensive response at https://github.com/orgs/PowerShell/discussions/21321?sort=top#discussioncomment-8726472, I've created the answer:

([System.IO.DriveInfo]::GetDrives() | Where-Object -Property 'Name' -Eq -Value (df "$PWD" | awk '{if ($1 != "Filesystem") print $6}')).DriveFormat

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@RokeJulianLockhart
Comment options

@rhubarb-geek-nz
Comment options

@RokeJulianLockhart
Comment options

@rhubarb-geek-nz
Comment options

@RokeJulianLockhart
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by RokeJulianLockhart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants