Skip to content

Instantly share code, notes, and snippets.

@salvatorecapolupo
Created September 13, 2025 12:47
Show Gist options
  • Save salvatorecapolupo/e54592cc96f904dbb8f087d5dcca92e3 to your computer and use it in GitHub Desktop.
Save salvatorecapolupo/e54592cc96f904dbb8f087d5dcca92e3 to your computer and use it in GitHub Desktop.
Raccolta di comandi one-liner https://it.wikipedia.org/wiki/One-liner
# impostare i permessi di wordpress su macchina linux, con % di avanzamento dinamica
TOTAL=$(find /var/www/html | wc -l); COUNT=0; find /var/www/html -print0 | while IFS= read -r -d '' ITEM; do [ -d "$ITEM" ] && chmod 755 "$ITEM" || chmod 644 "$ITEM"; chown www-data:www-data "$ITEM"; COUNT=$((COUNT+1)); echo -ne "Progresso: $((COUNT*100/TOTAL))% ($COUNT/$TOTAL)\r"; done; echo
# to be continued
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment