file-manager
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFile Manager Skill
文件管理Skill
Help users find and organize files on their computer.
帮助用户查找和整理其电脑上的文件。
Find Files
查找文件
bash
undefinedbash
undefinedBy name (case-insensitive)
By name (case-insensitive)
find ~/Desktop ~/Documents ~/Downloads -iname "report" -type f 2>/dev/null
find ~/Desktop ~/Documents ~/Downloads -iname "report" -type f 2>/dev/null
By extension
By extension
find ~/Downloads -name "*.pdf" -type f
find ~/Downloads -name "*.pdf" -type f
By size (larger than 100MB)
By size (larger than 100MB)
find ~ -size +100M -type f 2>/dev/null | head -20
find ~ -size +100M -type f 2>/dev/null | head -20
Recently modified (last 7 days)
Recently modified (last 7 days)
find ~/Documents -mtime -7 -type f | head -20
find ~/Documents -mtime -7 -type f | head -20
Duplicates by size (potential dupes)
Duplicates by size (potential dupes)
find ~/Downloads -type f -exec ls -la {} + | sort -k5 -n | uniq -d -f4
undefinedfind ~/Downloads -type f -exec ls -la {} + | sort -k5 -n | uniq -d -f4
undefinedOrganize
整理文件
bash
undefinedbash
undefinedMove all PDFs from Downloads to Documents
Move all PDFs from Downloads to Documents
mv ~/Downloads/*.pdf ~/Documents/
mv ~/Downloads/*.pdf ~/Documents/
Create dated folder and move files
Create dated folder and move files
mkdir -p ~/Documents/$(date +%Y-%m-%d)
mkdir -p ~/Documents/$(date +%Y-%m-%d)
Rename files (pattern)
Rename files (pattern)
for f in *.jpeg; do mv "$f" "${f%.jpeg}.jpg"; done
undefinedfor f in *.jpeg; do mv "$f" "${f%.jpeg}.jpg"; done
undefinedCleanup
清理文件
bash
undefinedbash
undefinedShow large files in Downloads
Show large files in Downloads
du -sh ~/Downloads/* | sort -rh | head -20
du -sh ~/Downloads/* | sort -rh | head -20
Empty trash (macOS)
Empty trash (macOS)
rm -rf ~/.Trash/*
rm -rf ~/.Trash/*
Clear old downloads (older than 30 days)
Clear old downloads (older than 30 days)
find ~/Downloads -mtime +30 -type f
undefinedfind ~/Downloads -mtime +30 -type f
undefinedCompress/Extract
压缩/解压
bash
undefinedbash
undefinedCreate zip
Create zip
zip -r archive.zip folder/
zip -r archive.zip folder/
Create tar.gz
Create tar.gz
tar czf archive.tar.gz folder/
tar czf archive.tar.gz folder/
Extract
Extract
unzip archive.zip
tar xzf archive.tar.gz
undefinedunzip archive.zip
tar xzf archive.tar.gz
undefinedTips
注意事项
- Always use over
trashwhen available (recoverable)rm - Preview file lists before bulk operations
- Ask before deleting — show what would be affected first
- 条件允许时优先使用 而非
trash(可恢复)rm - 批量操作前先预览文件列表
- 删除操作前先询问用户,先展示将会受到影响的文件