pluginagentmarketplace/custom-plugin-bash-shell · Archived

file-operations

Production-grade file operations - permissions, find, archives, rsync

First seen Jun 7, 2026

Installation

$ npx skills add pluginagentmarketplace/custom-plugin-bash-shell --skill file-operations

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from pluginagentmarketplace/custom-plugin-bash-shell.

npx skills add pluginagentmarketplace/custom-plugin-bash-shell

Browse all from pluginagentmarketplace/custom-plugin-bash-shell

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
License LICENSE
Default branch main
Open issues 0
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Version2.0.0

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,148 B
  • docs SUMMARY.md 92 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

File Operations Skill

Master file system operations with production-ready patterns

Learning Objectives

After completing this skill, you will be able to:

  • Manage file permissions (chmod, chown)
  • Search files efficiently with find and fd
  • Create and extract archives (tar, zip)
  • Synchronize files with rsync
  • Work with symbolic and hard links

Prerequisites

  • Bash basics
  • Understanding of file systems
  • Command line navigation

Core Concepts

1. Permission Management

# Numeric notation
chmod 755 script.sh       # rwxr-xr-x
chmod 644 file.txt        # rw-r--r--
chmod 600 secret.key      # rw-------

# Symbolic notation
chmod u+x script.sh       # Add execute for owner
chmod g-w file.txt        # Remove write for group
chmod a+r public.txt      # Add read for all

# Ownership
chown user:group file
chown -R user:group dir/

# Common patterns
chmod 600 ~/.ssh/id_rsa   # SSH private key
chmod 755 /var/www/html/  # Web directory

2. Find Command

# By name
find . -name "*.txt"
find . -iname "*.TXT"     # Case insensitive

# By type
find . -type f            # Files
find . -type d            # Directories
find . -type l            # Symlinks

# By size/time
find . -size +100M        # Larger than 100MB
find . -mtime -7          # Modified in 7 days

# Actions
find . -name "*.tmp" -delete
find . -type f -exec chmod 644 {} +

3. Archive Operations

# Create archives
tar -cvf archive.tar dir/
tar -czvf archive.tar.gz dir/   # gzip
tar -cjvf archive.tar.bz2 dir/  # bzip2

# Extract archives
tar -xvf archive.tar
tar -xzvf archive.tar.gz -C /dest/

# ZIP
zip -r archive.zip dir/
unzip archive.zip

4. Rsync

# Local sync
rsync -avz source/ dest/

# Remote sync
rsync -avz local/ user@host:/remote/

# With delete (mirror)
rsync -avz --delete source/ dest/

# Dry run
rsync -avzn source/ dest/

Common Patterns

Safe Delete Pattern

# With confirmation
rm -i file.txt

# With variable check
rm -rf "${DIR:?}/"   # Fails if DIR empty

Backup Pattern

# Timestamped backup
backup() {
    local src="$1"
    local timestamp=$(date +%Y%m%d_%H%M%S)
    cp -a "$src" "${src}.${timestamp}.bak"
}

Find and Process

# Fix permissions
find /var/www -type d -exec chmod 755 {} +
find /var/www -type f -exec chmod 644 {} +

# Delete old files
find /tmp -type f -mtime +7 -delete

Anti-Patterns

Don't Do Why
rm -rf $VAR/ rm -rf "${VAR:?}/" Empty VAR = delete /
`find \ xargs rm` find -delete Handles spaces
cp -r for sync rsync -a rsync is smarter

Practice Exercises

  1. Permission Fixer: Script to fix web dir permissions
  2. Old File Cleaner: Remove files older than N days
  3. Backup Script: Timestamped backup with rotation
  4. Sync Tool: Two-way directory sync

Troubleshooting

Common Errors

Error Cause Fix
Permission denied Wrong permissions Check with ls -la
No such file Path typo Verify path exists
Directory not empty rm without -r Add -r flag
Cross-device link Hard link across fs Use symlink

Debug Techniques

# Check permissions
stat file.txt
ls -la file.txt

# Trace find
find . -name "*.txt" -print

# Dry-run rsync
rsync -avzn source/ dest/

Safety Guidelines

  1. Always dry-run rsync with --delete first
  2. Quote paths with spaces: "$path"
  3. Verify paths before rm -rf
  4. Use trash instead of rm when possible
  5. Backup before bulk operations

Resources