Sunday, February 23, 2025

What's the quickest way to find duplicated files?

find . ! -empty -type f -exec md5sum {} + | sort | uniq -w32 -dD
fdupes -r /
linux_czkawka_gui.AppImage

Wednesday, January 01, 2025

Git get all remote branches

git branch -r \
  | grep -v '\->' \
  | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" \
  | while read remote; do \
      git branch --track "${remote#origin/}" "$remote"; \
    done
git fetch --all
git pull --all

Sort commits by date

git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:iso8601) %(refname:short)'
or put in .gitconfig alias
[alias]
recent = "!git for-each-ref --sort=-committerdate refs/heads/ --format='%(committerdate:iso8601) %(refname:short)'"

Check git configuration

git config --global -l

What's the quickest way to find duplicated files?

find . ! -empty -type f -exec md5sum {} + | sort | uniq -w32 -dD fdupes -r / linux_czkawka_gui.AppImage