Loading...
Loading...
Enforces using GNU coreutils commands with 'g' prefix instead of Mac default BSD commands. Prohibits using Mac standard commands. MUST ALWAYS be applied when using coreutils commands like ls, find, sed, awk, grep, etc.
npx skill4agent add totto2727-dotfiles/agents use-gnu-coreutilsg| GNU Command (Use) | Mac BSD Command (Prohibited) | Description |
|---|---|---|
| | List directory contents |
| | Find files |
| | Stream editor |
| | Pattern scanning and processing |
| | Search patterns |
| | Concatenate files |
| | Copy files |
| | Move files |
| | Remove files |
| | Create directories |
| | Change file permissions |
| | Change file ownership |
| | Display/set date |
| | Change file timestamps |
| | Display first lines |
| | Display last lines |
| | Sort lines |
| | Remove duplicate lines |
| | Word count |
| | Cut fields |
| | Translate characters |
| | Build and execute commands |
| | Resolve absolute paths |
| | Display file status |
| | Read symbolic links |
| | Create links |
| | Shuffle lines |
| | Split files |
| | Base64 encode/decode |
| | MD5 checksum |
| | SHA256 checksum |
# List files with GNU ls
gls -la
# Find files with GNU find
gfind . -name "*.ts" -type f
# Text processing with GNU sed
gsed -i 's/old/new/g' file.txt
# Pattern matching with GNU grep
ggrep -r "pattern" .
# Path operations with GNU realpath
grealpath --relative-to=/base /target
# File operations
gcp source.txt dest.txt
gmv old.txt new.txt
grm -rf directory/# DO NOT USE Mac standard commands
ls -la
find . -name "*.ts"
sed -i '' 's/old/new/g' file.txt
grep -r "pattern" .
realpath file.txt
cp source.txt dest.txt# Copy with GNU cp
gcp -r source/ dest/
# Move with GNU mv
gmv file.txt newdir/
# Remove with GNU rm
grm -rf directory/# Search and replace with GNU sed
gsed -i 's/pattern/replacement/g' file.txt
# Pattern matching with GNU grep
ggrep -E "pattern1|pattern2" file.txt
# Process with GNU awk
gawk '{print $1, $3}' file.txt# Find files with GNU find
gfind . -type f -name "*.ts" -exec ggrep -l "pattern" {} \;
# Find and process
gfind . -name "*.log" -mtime +30 -delete# Get absolute path
grealpath ./file.txt
# Get relative path
grealpath --relative-to=/base /targetbrew install coreutilsg