ShellSpells
  • 🧙‍♂️Welcome!
    • ShellSpells
    • FAQs
    • License & Disclaimer
  • 🐧Linux
    • System Ops
      • Transcripts
      • Help
      • System Info
        • Date/Time
        • System Details
        • Patches & Updates
        • Init System Identification
        • Hostname / Host ID
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Shares
        • Packages
        • Connected Devices
        • Kernel Modules (Drivers)
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Jobs
        • Enumerate
        • Modify
      • Processes
        • Enumerate
        • Modify
        • Custom Script and Shared Object
        • Process I/O Redirection
      • Services
        • Enumerate
        • Modify
        • Create a Service
      • Startup/Boot Scripts
        • Enumerate
        • Modify
      • Security
        • Antivirus
        • Firewall
        • SSH Keys
      • History & Logs
        • History
        • Logs
    • File Ops
      • Search
        • Filename
        • Content
        • Users (Owners)
        • Time
        • Size
        • Permission
        • Hidden Files
        • Inode
        • Find + Exec
        • Notes
      • Enumerate Metadata
      • Modify Metadata
      • Read Content
      • Modify Content
      • Extract Content
      • Sort / Compare / Count
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
    • Terminal Ops
      • Keyboard Shortcuts
      • Tmux Shortcuts
  • 🪟Windows
    • System Ops
      • Transcripts
      • Help
      • System Info
        • One-liners
        • Date/Time
        • System Details
        • Hotfixes
        • Domain or Workgroup
        • Data Execution Prevention
        • Variables
        • Hardware & Resources
      • Filesystem
        • Traverse & Enumerate
        • Drives & Partitions
        • Installed Software
        • Drivers
        • Shares
      • Registry
        • Enumerate
        • Modify
        • Forensically Relevant Keys
      • Users & Groups
        • Enumerate
        • Modify
      • Network
        • Enumerate
        • Modify
      • Scheduled Tasks
      • Processes
        • Enumerate
        • Modify
      • Services
        • Enumerate
        • Modify
      • Autorun / Startup
        • Enumerate
        • Modify
      • Security
        • Permissions
          • Enumerate
          • Page
        • Antivirus
        • Firewall
          • Enumerate
          • Modify
        • Audit Policies
        • Remoting
          • Enumerate
          • Modify
          • Registry Locations
        • Stored Credentials
      • Remote Command Execution
      • Active Directory
        • Enumerate
        • Modify
      • History & Logs
        • History
        • Logs
      • PowerShell Config
      • Scripting
      • WMIC Notes
    • File Ops
      • Search
        • Filename
        • Time
        • Size
        • Permissions
        • Attributes
        • Wildcarding
      • Enumerate Metadata
        • One Liners
        • Users (Owners)
        • Timestamps
        • Size
        • Permissions
        • Attributes
      • Modify Metadata
        • Change Owner
        • Timestamps
        • Size
        • Attributes
      • Read Content
      • Modify Content
        • Overwrite
        • Insert
        • Append
        • Replace / Remove
        • Convert Case
        • Alternate Data Streams
      • Extract Content
      • Sort / Compare / Count
        • Sort
        • Count
        • Compare
      • Move
      • Copy
      • Execute
      • Hash
      • Encode/Decode
      • Compress/Decompress
      • Working With Weird Filenames
      • Output Formatting / Filtering
      • File Formatting
      • Operators
  • ⛓️Network
    • Traffic Manipulation
      • iptables
        • Option List
        • General Commands
        • Filter Tables
        • NAT
        • Mangle
        • Filter for SSH Traffic (Example)
      • nftables
    • Packet Capture
      • Syntax
      • TCPDump Examples
    • Packet Analysis
      • Wireshark
  • 🚗Maneuver
    • SSH
    • Control Sockets
    • RDP
    • Windows Port Proxy
  • 🛩️Data Transfer
    • SCP
    • FTP
    • Netcat
      • Netcat Relays
    • Server Interactions
    • Alternate Methods
  • 🪄REGEX
    • Examples
Powered by GitBook
On this page
  • Enumerate
  • Modify

Was this helpful?

  1. Linux
  2. System Ops
  3. Filesystem

Drives & Partitions

Enumerate

fdisk -l

List Partitions and Drives.

parted -l

List Partitions and Drives (with more details).

lsblk

List Block Devices.

blkid

List block devices and their UUIDs. Useful for identifying specific drives.

hdparm -i /dev/sda

Information about a SATA drive.

smartctl -a /dev/sda

S.M.A.R.T. data for a SATA drive (health status).

cat /etc/fstab

List Filesystems from /etc/fstab.

mount

List Mounted Filesystems.

df -h

Display Disk Usage and Free Space (Human-Readable).

df -t

Filesystem types.

df -i

Inode usage.

du -sh <dir>

Display Directory Disk Usage (Human-Readable).

statvfs <dir>

Display Filesystem Information.

Block Device = Storage device that manages data in fixed-size blocks or chunks.

Modify

fdisk <device>

Interactively Create and Manage Disk Partitions (e.g., fdisk /dev/sda).

parted <device>

Interactively Create and Manage Disk Partitions with more features (e.g., parted /dev/sda).

resize2fs <partition>

Resize an Ext2/Ext3/Ext4 Filesystem on a Partition.

gparted

Graphical Partition Editor for managing partitions.

umount <mount_point>

Unmount a Mounted Filesystem (e.g., umount /mnt/mydrive).

sync

Synchronize Cached Data to Disk.

partprobe

Inform the OS of Partition Table Changes.

gdisk <device>

GUID Partition Table (GPT) Disk Utility (e.g., gdisk /dev/sda).

mkpart

Create a New Partition in gdisk.

resizepart

Resize a Partition in gdisk.

mklabel

Create a GPT Label in gdisk.

partx

Create Device Maps for Partitions.

lvm

Logical Volume Manager for managing logical volumes.

pvcreate

Initialize a Physical Volume for use in LVM (e.g., pvcreate /dev/sdb1).

vgcreate

Create a Volume Group in LVM (e.g., vgcreate myvg /dev/sdb1).

lvcreate

Create a Logical Volume in LVM (e.g., lvcreate -L 10G -n mylv myvg).

lvresize

Resize a Logical Volume in LVM (e.g., lvresize -L +2G /dev/myvg/mylv).

mkswap <partition>

Create a Swap Space on a Partition (e.g., mkswap /dev/sdb2).

swapon <partition>

Enable Swap Space on a Partition (e.g., swapon /dev/sdb2).

swapoff <partition>

Disable Swap Space on a Partition (e.g., swapoff /dev/sdb2).

mdadm

Manage Software RAID (Redundant Array of Independent Disks).

mkraid

Create a Software RAID Array.

mdadm --create

Create a RAID Device.

mdadm --add

Add a Disk to an Existing RAID array.

mdadm --remove

Remove a Disk from a RAID array.

mdadm --grow

Grow or Resize a RAID array.

mkfs <filesystem_type> <partition>

Create a Filesystem on a Partition (e.g., mkfs.ext4 /dev/sda1).

dd

Copy Data from One Device/Partition to another.

dd if=<source> of=<destination>

Copy Data from Source to Destination (e.g., dd if=/dev/sdb of=/dev/sdc).

dd if=<source> of=<destination> bs=<block_size>

Copy Data with Specified Block Size (e.g., dd if=/dev/sdb of=/dev/sdc bs=4M).

PreviousTraverse & EnumerateNextShares

Last updated 1 year ago

Was this helpful?

🐧