Skip to content

Instantly share code, notes, and snippets.

View markheramis's full-sized avatar
💭
I may be slow to respond. Busy

Mark Clu Heramis markheramis

💭
I may be slow to respond. Busy
  • Wend Corporation
  • Philippines
View GitHub Profile
@markheramis
markheramis / DICOMweb-Collection.json
Last active October 23, 2025 12:00
DICOMweb Postman Collection
{
"info": {
"name": "DICOMweb API Collection",
"description": "Postman collection for DICOMweb APIs: QIDO-RS, STOW-RS, WADO-RS, and UPS-RS.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "QIDO-RS",
"item": [
@markheramis
markheramis / README.md
Created April 10, 2026 02:02
Search for Large Files

Large File Search (large-file-search.sh)

A robust, dependency-free bash script that recursively searches a directory to find the largest files. It is designed to be safe with complex file names (like those containing spaces) and automatically respects your project's .gitignore rules.

Features

  • Automatic .gitignore Parsing: Automatically detects and ignores files/directories listed in a .gitignore file located in the target directory.
  • Custom Ignore Flags: Pass specific directories or patterns to ignore on the fly using --ignore.
  • Space-Safe: Uses dynamic bash arrays and tab-delimiters to ensure files and directories with spaces in their names do not break the script.
  • Human-Readable Output: Converts byte counts into highly readable formats (B, KB, MB, GB).
  • Absolute Paths: Automatically resolves and displays the absolute path of the files for easy locating.

find-large-files.ps1

PowerShell port of the original Bash large-files finder. Recursively scans a directory (and its subdirectories), prunes ignored paths exactly like the Bash version (including .gitignore + command-line --ignore patterns + .git), then lists the top N largest files with human-readable sizes (B / KB / MB / GB). Identical behavior to the Bash script you provided:

  • Same argument parsing
  • Same .gitignore parsing rules (skip empty lines/comments, trim, remove trailing /)
  • Same prune semantics (-name for wildcards, -path "*/pat" + -path "*/pat/*" for directories)
  • Same output formatting and column alignment
  • Same silent error handling (2>/dev/null-ErrorAction SilentlyContinue)