Examples
Command Examples
Real-world examples of what you can do with ShellPilot.
File Management
"Find all log files larger than 50MB and delete them"
find . -name '*.log' -size +50M -delete
Searches for .log files over 50MB and removes them
"Recursively change permissions to 755 for all directories"
find . -type d -exec chmod 755 {} \;Sets directory permissions to rwxr-xr-x
"Create a backup of all Python files with timestamp"
tar -czf backup_$(date +%Y%m%d_%H%M%S).tar.gz *.py
Creates a timestamped compressed archive of Python files
Docker & Containers
"Stop all running containers and remove them"
docker stop $(docker ps -q) && docker rm $(docker ps -aq)
Gracefully stops all containers, then removes them
"Show disk usage of all Docker images"
docker images --format '{{.Repository}}:{{.Tag}} {{.Size}}' | sort -k2 -hLists images with their sizes, sorted by size
"Clean up unused Docker resources"
docker system prune -af --volumes
Removes all unused containers, networks, images, and volumes
Git & Version Control
"Undo the last commit but keep the changes"
git reset --soft HEAD~1
Moves HEAD back one commit, keeping changes staged
"Find commits that modified a specific file"
git log --follow -p -- path/to/file
Shows commit history with diffs for a file, following renames
"Create a patch from the last 3 commits"
git format-patch -3 HEAD
Generates patch files for the last 3 commits
System Administration
"Show processes using the most memory"
ps aux --sort=-%mem | head -10
Lists top 10 memory-consuming processes
"Monitor disk I/O in real-time"
iostat -x 1
Displays extended disk I/O statistics every second
"Find which process is using port 8080"
lsof -i :8080
Lists processes bound to port 8080
Networking
"Test if a remote port is open"
nc -zv hostname 443
Checks connectivity to port 443 on hostname
"Download a file and resume if interrupted"
curl -C - -O https://example.com/large-file.zip
Downloads with resume capability for interrupted transfers
"Show all established network connections"
ss -tunapl | grep ESTAB
Lists all established TCP/UDP connections with process info