Skip to content

Instantly share code, notes, and snippets.

@StartAutomating
Last active June 7, 2024 17:37
Show Gist options
  • Select an option

  • Save StartAutomating/d1d1c1990a0138a4c7f8cadfbc7131f3 to your computer and use it in GitHub Desktop.

Select an option

Save StartAutomating/d1d1c1990a0138a4c7f8cadfbc7131f3 to your computer and use it in GitHub Desktop.
Find Read/Write Mounts in a Container
# When run within a container, this will output the directories that are mounted as read/write.
(Select-String "\S+\s(?<p>\S+).+rw,.+symlinkroot=/mnt/host" "/proc/mounts").Matches.Groups |
Where-Object Name -eq p |
Get-Item -path { $_.Value }
# Hope This Helps! / Have Fun!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment