Explain find code

Paste find commands and Vibe explains what each test picks out, which folders are skipped and what happens to every file that matches.

clean-project.sh

Up to 1,500 characters (about 60 lines). Your code is sent to Unvibe and Anthropic to write the explanation. Don't paste keys or passwords. Common key formats are refused.

Vibe20 lines selected

Press Explain it for the sample, or paste your own code first.

What this find sample shows

start folder and tests
find . walks the current folder and everything below it, and each test after it narrows the list. -name "*.log" matched by file name and found ./debug.log and ./logs/app.log on a test project. -type d means folders and -type f means files.
-prune
-prune stops find from going into a folder it matched. The second command printed ./node_modules and ./web/node_modules and nothing from inside them. In the fourth, -path ./.git -prune -o ... skips .git and checks everything else.
-size and -mtime
-size +1M means bigger than 1 MB and found the 2 MB logs/big.bin. -mtime -7 means changed less than 7 days ago: it printed logs/big.bin and src/app.js, and skipped files last changed 20 and 30 days ago.
-exec and -delete
-exec wc -l {} + runs a command on the matches, with {} standing for the file names; the + hands them over in one go, so wc printed one line per file and a 3 total. The node_modules files were left out by -not -path. -delete removes what matched: it removed both empty folders under tmp, and then tmp too, once it was empty.

Good to know

  • Run with GNU find 4.11 on a test project with code, logs, node_modules folders, a .git folder and empty folders.
  • Quote patterns like "*.log". Unquoted, the shell filled in the .log files in the current folder first, and find stopped with find: paths must precede expression, naming one of those files, and asked about a possible unquoted pattern after -name.
  • Run a find without -delete first and read the list. Nothing asks before -delete removes a file.

Watch out: -o means or, and an action such as -print only belongs to the test right before it. find . -name "*.log" -o -name "*.bin" -print printed only ./logs/big.bin. With parentheses, find . \( -name "*.log" -o -name "*.bin" \) -print printed all four matches.

Explain find code beside your editor

Unvibe is a free app for Mac and Windows. In the app there is no pasting: select code in any app and press Control+U (Ctrl+Alt+U on Windows).

Install on Mac

curl -fsSL https://unvibe.site/install.sh | bash

Paste into Terminal. Unvibe isn't notarized by Apple yet, so this is the smooth path.

Opening the .dmg the first time
  1. Open the .dmg and drag Unvibe to Applications.
  2. Open it once; macOS says it can't verify it. Click Done.
    macOS dialog: Unvibe Not Opened, with Done and Move to Trash
    Real screen, macOS 15
  3. System Settings › Privacy & Security › Open Anyway. Confirm, then enter your Mac password. The button shows for about an hour after you try to open Unvibe.
    macOS Privacy & Security, Security section: Unvibe was blocked to protect your Mac, with the Open Anyway button
    Real screen, macOS 15

The Terminal line checks the download against the published SHA-256 and Unvibe's self-signed signature before it installs anything. More help with the first open