Skip to content
Lanedirt.tech
Lanedirt.tech

Lanedirt.tech

  • Tips & tricks
  • About Lanedirt

Category: Bash

Add docker compose exec bash alias

If you’re frequently using the docker compose exec command and want a faster way to access your Docker containers, this guide will show you how to create a simple alias or function in your .zshrc file on macOS. Step 1: open your .zshrc file Step 2: Add the de Function Scroll to the bottom of… Continue reading Add docker compose exec bash alias

Published January 16, 2025
Categorized as Bash, MacOS

Linux find and remove files older than N days

Find files older than N days If you wish to find and delete certain files that are older than a certain amount of days, you can use this snippet: What this does is it finds all files matching the filter /path/to/files-beginning-with* that have been created more than 5 days ago. You can change the “+5”… Continue reading Linux find and remove files older than N days

Published January 29, 2022
Categorized as Bash, UNIX Shell
Lanedirt.tech
Lanedirt.tech
Proudly powered by WordPress.