Skip to content

Instantly share code, notes, and snippets.

@senorsmile
senorsmile / zfs_introspect_file.md
Created January 8, 2021 18:52 — forked from mbarczak/zfs_introspect_file.md
ZFS: Introspect a File (Acquiring Creation Time... etc)

Introspecting a file on ZFS

Derived from: http://www.c0t0d0s0.org/archives/7485-Find-out-in-depth-information-about-a-file-in-ZFS.html

Sometimes you need to acquire in-depth information about a file that isn't exposed by other commands like stat.

ZFS allows you to do this with zdb. However there's a confusing problem. If you're just trying to access a file on your root pool that doesn't have any nested datasets, you need use rpool/ instead of just rpool (assuming "rpool" is the name of your root pool).

Here's 3 examples of acquiring information on /filepath.

@senorsmile
senorsmile / run.sh
Created April 3, 2021 22:38
Rust cargo runner script
#!/usr/bin/env bash
set -euo pipefail
#----------
# vars
#----------
debug=1
clippy=1
@senorsmile
senorsmile / winrm_enable.ps1
Created November 26, 2024 17:37
Powershell script to enable winrm
# Enables the WinRM service and sets up the HTTP listener
Enable-PSRemoting -Force
# Opens port 5985 for all profiles
$firewallParams = @{
Action = 'Allow'
Description = 'Inbound rule for Windows Remote Management via WS-Management. [TCP 5985]'
Direction = 'Inbound'
DisplayName = 'Windows Remote Management (HTTP-In)'
LocalPort = 5985