r/zsh • • 8h ago

Finding files by extension and copying them to a folder

0 Upvotes

On a 2021 Mac, I would like to run a shell script that searches all the folders in the current directory and all folders under those folders for files ending in the following (include upper and lower case variants): heic, jpg, and jpeg

Copy files matching those extensions into a folder named POST in the current directory.

Thanks for your attention to this.

Gemini suggests this but I don't trust it. :-)

mkdir -p POST find . -path ./POST -prune -o -type f \( -iname "*.heic" -o -iname "*.jpg" -o -iname "*.jpeg" \) -exec cp -n {} POST/ \;


r/zsh • • 12h ago

I made a ZSH setup that handles pretty much everything for you

Post image
19 Upvotes

I've been working on a project called Sexy Shell Config (SSC) and finally released v1.0.0 today.

It's basically the terminal setup I wanted to have whenever I set up a new machine, without having to install dependencies, plugins and fonts or configure everything manually again.

It uses Oh My Zsh, Powerlevel10k, Fastfetch, fzf, zoxide, eza and a few other plugins. I also added built-in help, startup tips and automatic backups so it's easier to use even if you're relatively new to ZSH.

The whole setup can be installed with a single curl command. The installer handles Homebrew or APT and the necessary dependencies. If you don't like it, you can restore your original shell configuration with a single command (ssc-restore).

My main focus was Apple Silicon Macs. SSC uses native ARM64 Homebrew, so you also get a native environment for installing other tools later, without relying on Rosetta. It supports Ubuntu, Debian and WSL2 as well.

It's MIT licensed and has no telemetry.

I'd appreciate any feedback.

GitHub: https://github.com/Hype-Cloud/sexy-shell-config