📁 Gestión de Archivos 📖 Oficial

Sincronización y Comparación de Carpetas

Sincronice archivos entre carpetas, compare diferencias y mantenga el contenido consistente

★★☆ Intermedio 10-15 min 12 de enero de 2025
📋

Escenario

💬

Prompt

Please compare the differences between these two folders:
- Source: ~/Documents/Projects
- Target: /Volumes/USB/Projects
Show:
- Files that only exist in the source folder
- Files that only exist in the target folder
- Files that exist in both but have different content (determined by modification time or checksum)
- Summary of total count and total size

Then execute one-way sync:
- From ~/Documents/Projects to /Volumes/USB/Projects
- Only copy new and updated files
- Keep extra files in the target folder (don't delete)
- Show sync progress and completed file count
- Log sync activity to ~/sync_log.txt

Resultado Esperado

💡

Consejos

  • Usar los parámetros -avh de rsync muestra progreso detallado. Agregar --exclude puede excluir archivos que no necesitan sincronizarse, como .DS_Store, node_modules, etc.