file-organization
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- Adapted from: awesome-claude-skills/file-organizer -->
<!-- 改编自:awesome-claude-skills/file-organizer -->
File Organization Guide
文件整理指南
Organize files, find duplicates, and maintain clean folder structures.
整理文件、查找重复文件并维护整洁的文件夹结构。
When to Use
适用场景
- Downloads folder is chaotic
- Can't find files (scattered everywhere)
- Duplicate files taking up space
- Folder structure doesn't make sense
- Starting a new project structure
- Cleaning up before archiving
- 下载文件夹杂乱无章
- 找不到文件(分散在各处)
- 重复文件占用存储空间
- 文件夹结构不合理
- 搭建新项目的目录结构
- 归档前进行清理
Analysis Commands
分析命令
bash
undefinedbash
undefinedOverview of directory
Overview of directory
ls -la [directory]
ls -la [directory]
Count file types
Count file types
find [directory] -type f | sed 's/.*.//' | sort | uniq -c | sort -rn
find [directory] -type f | sed 's/.*.//' | sort | uniq -c | sort -rn
Largest files
Largest files
du -sh [directory]/* | sort -rh | head -20
du -sh [directory]/* | sort -rh | head -20
Files modified this week
Files modified this week
find [directory] -type f -mtime -7
undefinedfind [directory] -type f -mtime -7
undefinedFinding Duplicates
查找重复文件
bash
undefinedbash
undefinedBy hash (exact duplicates)
By hash (exact duplicates)
find [directory] -type f -exec md5sum {} ; | sort | uniq -d
find [directory] -type f -exec md5sum {} ; | sort | uniq -d
By name
By name
find [directory] -type f -printf '%f\n' | sort | uniq -d
find [directory] -type f -printf '%f\n' | sort | uniq -d
By size
By size
find [directory] -type f -printf '%s %p\n' | sort -n | uniq -D -w 10
undefinedfind [directory] -type f -printf '%s %p\n' | sort -n | uniq -D -w 10
undefinedOrganization Patterns
整理模式
By Type
按文件类型分类
Downloads/
├── Documents/ # PDF, DOCX, TXT
├── Images/ # JPG, PNG, SVG
├── Videos/ # MP4, MOV
├── Archives/ # ZIP, TAR, DMG
├── Code/ # Projects
└── ToSort/ # Needs decisionDownloads/
├── Documents/ # PDF、DOCX、TXT格式文件
├── Images/ # JPG、PNG、SVG格式图片
├── Videos/ # MP4、MOV格式视频
├── Archives/ # ZIP、TAR、DMG压缩包
├── Code/ # 项目代码文件
└── ToSort/ # 待分类文件By Purpose
按用途分类
Documents/
├── Work/
│ ├── Projects/
│ ├── Reports/
│ └── Archive/
└── Personal/
├── Finance/
├── Medical/
└── Archive/Documents/
├── Work/
│ ├── Projects/
│ ├── Reports/
│ └── Archive/
└── Personal/
├── Finance/
├── Medical/
└── Archive/By Date
按日期分类
Photos/
├── 2024/
│ ├── 01-January/
│ ├── 02-February/
│ └── ...
├── 2023/
└── Unsorted/Photos/
├── 2024/
│ ├── 01-January/
│ ├── 02-February/
│ └── ...
├── 2023/
└── Unsorted/Organization Workflow
整理工作流程
- Analyze - Review current structure
- Plan - Propose new structure
- Confirm - Get user approval
- Execute - Move files systematically
- Summarize - Report changes
- 分析 - 查看当前目录结构
- 规划 - 提出新的结构方案
- 确认 - 获得用户认可
- 执行 - 系统地移动文件
- 总结 - 汇报变更内容
Execution Commands
执行命令
bash
undefinedbash
undefinedCreate structure
Create structure
mkdir -p "path/to/new/folders"
mkdir -p "path/to/new/folders"
Move files
Move files
mv "old/path/file.pdf" "new/path/file.pdf"
mv "old/path/file.pdf" "new/path/file.pdf"
Batch move by extension
Batch move by extension
find . -name "*.pdf" -exec mv {} Documents/ ;
undefinedfind . -name "*.pdf" -exec mv {} Documents/ ;
undefinedBest Practices
最佳实践
Folder Naming
文件夹命名规范
- Clear, descriptive names
- Avoid spaces (use hyphens)
- Use prefixes for ordering: ,
01-current02-archive
- 名称清晰、具有描述性
- 避免使用空格(改用连字符)
- 使用前缀排序:,
01-current02-archive
File Naming
文件命名规范
- Include dates:
2024-10-17-meeting-notes.md - Be descriptive
- Remove download artifacts: →
file (1).pdffile.pdf
- 包含日期:
2024-10-17-meeting-notes.md - 名称具有描述性
- 移除下载后缀:→
file (1).pdffile.pdf
When to Archive
归档时机
- Not touched in 6+ months
- Completed work for reference
- Old versions after migration
- Files you're hesitant to delete
- 超过6个月未使用
- 已完成的工作文件(仅作参考)
- 迁移后的旧版本文件
- 不确定是否要删除的文件
Maintenance Schedule
维护计划
| Frequency | Task |
|---|---|
| Weekly | Sort new downloads |
| Monthly | Review/archive projects |
| Quarterly | Check for duplicates |
| Yearly | Archive old files |
| 频率 | 任务 |
|---|---|
| 每周 | 整理新下载的文件 |
| 每月 | 审核/归档项目文件 |
| 每季度 | 检查重复文件 |
| 每年 | 归档旧文件 |
Important Rules
重要规则
- Always confirm before deleting
- Log all moves for undo
- Preserve modification dates
- Stop and ask on unexpected situations
- 删除前务必确认
- 记录所有移动操作以便撤销
- 保留文件修改日期
- 遇到异常情况时暂停并询问