Skip to content

Instantly share code, notes, and snippets.

View Syntrait's full-sized avatar

Syntrait Syntrait

  • 00:38 (UTC +03:00)
View GitHub Profile
Computer Information:
Manufacturer: ASUSTeK COMPUTER INC.
Model: GA401II
Form Factor: Laptop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 5 4600HS with Radeon Graphics
CPU Family: 0x17
CPU Model: 0x60
~> cat mydu.nu
#!/bin/nu
# Get all the directories in /
mut dirs = ls -a / | where name != "/home" and name != "/tmp" and name != "/proc" and name != "/efi" and name != "/dev" and name != "/run" and type != "symlink"
# Add the size of the directories as a new column
$dirs = $dirs | select name | insert size {|row| du ($row | get name)}
# Formatting