Rex::C...s::Mkfs(3pm)

✨ Rex::Commands::Mkfs πŸ’…

okay bestie, so this is the Rex::Commands::Mkfs page from the User Contributed Perl Documentation β€” and no, the title in the header is not a typo, it literally shows up as Rex::C...s::Mkfs(3pm) because man pages love to truncate things for the drama. It's Rex::Commands::Mkfs in full, and it's giving "let's make some filesystems" energy. πŸ¦‹


🌸 NAME 🌸

Rex::Commands::Mkfs β€” Create filesystems πŸŽ€


🫢 DESCRIPTION 🫢

So the whole vibe of this module? You can create filesystems on partitions and logical volumes that already exist. That's the moment. That's the assignment. Not forming the partitions, not doing the LVM homework β€” those already happened, bestie. This is the glow-up step where the existing partition or logical volume gets an actual filesystem on it. πŸ”₯


⭐ SYNOPSIS ⭐

just the one line and honestly? iconic.

use Rex::Commands::Mkfs;

πŸ‘‘ EXPORTED FUNCTIONS πŸ‘‘

πŸ’– mkfs($devname, %option) πŸ’–

This is the main character right here. It creates a filesystem on the device $devname. That's it, that's the function, and she ate. πŸ’…

Watch how easy this is β€” first one, an ext2 with a label:

mkfs "sda1",
  fstype => "ext2",
  label  => "mydisk";

and then a swap one, because swap is a filesystem type here too and we're not being weird about it:

mkfs "sda2",
  fstype => "swap";
ngl $devname is the device you're targeting and %option is the lil hash of options you hand over (like fstype and label in the examples above). The page doesn't list more of them, so we're not inventing any β€” no cap. πŸ™ˆ

and that's the whole page, bestie β€” short and slay. before you go: this one's from perl v5.40.1, dated 2025-10-03, and it lives in the manual as Rex::C...s::Mkfs(3pm). take care of your disks and hydrate. πŸ’œ πŸ“ ✨

πŸ“¦ where this page comes from