file-operationslisted
Install: claude install-skill ryukyagamilight/terminal-skills
# File and Directory Operations
## Overview
Linux file system operation skills, including file search, batch operations, permission management, etc.
## File Search
### find Command
```bash
# Search by name
find /path -name "*.log"
find /path -iname "*.LOG" # Case insensitive
# Search by type
find /path -type f # Files
find /path -type d # Directories
find /path -type l # Symbolic links
# Search by time
find /path -mtime -7 # Modified within 7 days
find /path -mtime +30 # Modified more than 30 days ago
find /path -mmin -60 # Modified within 60 minutes
# Search by size
find /path -size +100M # Larger than 100MB
find /path -size -1k # Smaller than 1KB
# Combined conditions
find /path -name "*.log" -mtime +7 -size +10M
```
### locate Command
```bash
# Quick search (requires database update)
locate filename
updatedb # Update database
# Case insensitive
locate -i filename
```
## File Operations
### Basic Operations
```bash
# Copy
cp file1 file2
cp -r dir1 dir2 # Recursive copy directory
cp -p file1 file2 # Preserve attributes
# Move/Rename
mv file1 file2
mv file1 /path/to/dest/
# Delete
rm file
rm -rf dir # Recursive force delete
rm -i file # Interactive confirmation
# Create
touch file # Create empt