Last active
June 7, 2024 17:37
-
-
Save StartAutomating/d1d1c1990a0138a4c7f8cadfbc7131f3 to your computer and use it in GitHub Desktop.
Find Read/Write Mounts in a Container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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