Menu

Haul :) a tiny file organizer daemon for Linux
πŸ“°

Haul :) a tiny file organizer daemon for Linux

DEV CommunityΒ·KUSHAL BARALΒ·6 months ago
#IbpVZKEm
#linux#bash#opensource#devtools#haul
Reading 0:00
15s threshold

I hate messy Downloads folders. You know the feeling:

report.pdf report(1).pdf report(2).pdf screenshot.png screenshot(1).png screenshot(2).png video_final.mp4 video_final_FINAL.mp4 notes.docx notes_copy.docx notes_copy_FINAL(1).docx

Enter fullscreen mode

Exit fullscreen mode

At some point you just stop caring and let it rot.

Cron jobs felt overkill β€” why poll every minute just to watch an empty folder? So I built haul . Drop a file in a watched folder, it moves it to the right place. That's it.

The trick β€” zero CPU when idle

haul uses inotify , a filesystem event API built into the Linux kernel. Instead of running a loop, it just waits for the kernel to say "hey, a file arrived" β€” sorts it β€” then exits. systemd restarts it immediately for the next file.

No polling. No persistent process.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.