File Cleanup — Part 2: Delete Old Log Files with fd

File Cleanup — Part 2: Delete Old Log Files with fd

fd -e log --changed-before 30d -x rm -v

Use fd to find all log files older than 30 days and pipe them to rm with verbose output, performing a targeted cleanup of stale logs without risking important data. fd's intuitive syntax and respect for .gitignore make it a safer and faster alternative to find.

#dust #fd #ncdu #workflow

Download

⬇ GIF (78.4 KB) ⬇ MP4 (Converting...)

Embed

[![File Cleanup — Part 2: Delete Old Log Files with fd](https://media.agentgif.com/preseed/workflow-file-cleanup-2/demo.gif)](https://agentgif.com/@agentgif/workflow-file-cleanup-2)
<a href="https://agentgif.com/@agentgif/workflow-file-cleanup-2"><img src="https://media.agentgif.com/preseed/workflow-file-cleanup-2/demo.gif" alt="File Cleanup — Part 2: Delete Old Log Files with fd" width="1200"></a>
<iframe src="https://agentgif.com/embed/5iCq5wf7/" width="1200" height="660" frameborder="0" allowfullscreen></iframe>
<div data-agentgif="5iCq5wf7"></div><script src="https://agentgif.com/widget.js" async></script>
by @agentgif · · 39 views