rsync
Sync files and directories with rsync. Use when a user asks to copy files between servers, sync directories, create incremental backups, deploy files to a remote server, or mirror directories efficiently.
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o rsync.zip https://jpskill.com/download/15354.zip && unzip -o rsync.zip && rm rsync.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15354.zip -OutFile "$d\rsync.zip"; Expand-Archive "$d\rsync.zip" -DestinationPath $d -Force; ri "$d\rsync.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
rsync.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
rsyncフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
rsync
Overview
rsync is the standard tool for efficient file synchronization. It only transfers changed parts of files (delta transfer), supports SSH, handles permissions, and works for backups, deployments, and directory mirroring.
Instructions
Step 1: Basic Usage
# Sync local directories
rsync -avz source/ destination/
# -a = archive (preserves permissions, timestamps, symlinks)
# -v = verbose
# -z = compress during transfer
# Sync to remote server
rsync -avz ./dist/ deploy@server:/var/www/myapp/
# Sync from remote
rsync -avz deploy@server:/var/log/myapp/ ./logs/
# Dry run (show what would change without doing it)
rsync -avzn source/ destination/
Step 2: Common Patterns
# Deploy website (delete files on destination that don't exist in source)
rsync -avz --delete ./build/ deploy@server:/var/www/site/
# Backup with exclude
rsync -avz --exclude='node_modules' --exclude='.git' --exclude='.env' \
/opt/myapp/ /backups/myapp/
# Incremental backup with hard links (space-efficient)
rsync -avz --link-dest=/backups/latest \
/opt/myapp/ /backups/$(date +%Y%m%d)/
ln -snf /backups/$(date +%Y%m%d) /backups/latest
# Bandwidth limited (useful for large transfers)
rsync -avz --bwlimit=5000 source/ destination/ # 5000 KB/s
Step 3: Deployment Script
#!/bin/bash
# scripts/deploy.sh — Deploy app with rsync
SERVER="deploy@prod.example.com"
REMOTE_DIR="/var/www/myapp"
echo "Building..."
npm run build
echo "Syncing files..."
rsync -avz --delete \
--exclude='node_modules' \
--exclude='.env' \
--exclude='.git' \
./dist/ ${SERVER}:${REMOTE_DIR}/
echo "Restarting service..."
ssh ${SERVER} "sudo systemctl restart myapp"
echo "Deploy complete!"
Guidelines
- Always use
-n(dry run) first when using--deleteto avoid accidental data loss. - Trailing slash matters:
source/syncs contents,sourcesyncs the directory itself. - For large transfers, add
--progressto see per-file progress. - rsync over SSH is encrypted by default — safe for internet transfers.