messages
listlengths
3
3
category
stringclasses
3 values
utility
stringclasses
89 values
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "download https://monitor.local/list.txt and count the lines" }, { "role": "assistant", "content": "curl -s https://monitor.local/list.txt | wc -l" }...
pipeline
curl
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "I want a cleanup script for /var/tmp that purges .gz files older than 10 days." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ntarget...
script
find
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "From report.csv, list the 20 most frequent field-4 entries with their counts." }, { "role": "assistant", "content": "cut -d, -f4 report.csv | sort | uniq -c | sort ...
pipeline
cut
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "What's bound to port 3306?" }, { "role": "assistant", "content": "lsof -i :3306" } ]
single
lsof
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Help me count how many rabbitmq processes are running." }, { "role": "assistant", "content": "pgrep -c rabbitmq" } ]
pipeline
pgrep
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "give me a human-readable long listing of assets" }, { "role": "assistant", "content": "ls -lh assets" } ]
single
ls
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Show a recursive listing of /var/cache." }, { "role": "assistant", "content": "ls -R /var/cache" } ]
single
ls
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "print lines of inventory.csv where column 1 is greater than 100" }, { "role": "assistant", "content": "awk '$1 > 100' inventory.csv" } ]
single
awk
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Fetch https://web01.internal/health and print only the HTTP status code." }, { "role": "assistant", "content": "curl -s -o /dev/null -w '%{http_code}' https://web01.internal/health" } ]
single
curl
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Tally column 5 of app.log and print the 20 top values by count." }, { "role": "assistant", "content": "awk '{print $5}' app.log | sort | uniq -c | sor...
pipeline
awk
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Show detailed metadata for audit.png." }, { "role": "assistant", "content": "stat audit.png" } ]
single
stat
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Edit inventory.yaml in place, replacing 'DELETE' with 'warning'." }, { "role": "assistant", "content": "sed -i 's/DELETE/warning/g' inventory.yam...
single
sed
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Ping api.service.io once and branch: print reachable or unreachable based on the result." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nhost=api.service.io\nif pin...
script
if
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Show a recursive listing of docs." }, { "role": "assistant", "content": "ls -R docs" } ]
single
ls
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Write a small script that requires exactly two arguments (source and destination) and errors out otherwise." }, { "role": "assistant", "content": "#!/...
script
args
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Read the CSV products.csv field by field (id,name,email) with a while loop and print a greeting." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -eu...
script
while
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Write a script that runs checksum with sha256sum on every .log file in /opt/app, 8 jobs in parallel." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset...
script
xargs
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Write me a script that renames every .JPG file in the current directory to .jpg." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset...
script
for
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Give me a script that iterates over backups/*.md and makes each file read-only." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\ndir=backups\nfor f in \"$dir\"/*.md;...
script
chmod
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "List the 5 largest subdirectories of /mnt/data." }, { "role": "assistant", "content": "du -h /mnt/data/* 2>/dev/null | sort -rh | head -n 5" } ]
pipeline
du
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Retry curl to https://8.8.8.8/health at most 3 times with a 1-second backoff, failing loudly if it never succeeds." }, { "role": "assistant", "co...
script
curl
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "show the system boot time using who" }, { "role": "assistant", "content": "who -b" } ]
single
who
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Help me total the resident memory of all redis-server processes in MB." }, { "role": "assistant", "content": "ps -C redis-server -o rss= | awk '{...
pipeline
ps
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Make a backup copy of config.yaml called config.yaml.bak" }, { "role": "assistant", "content": "cp config.yaml config.yaml.bak" } ]
single
cp
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Process all .txt files under /opt/app with checksum with sha256sum using 2 parallel workers via xargs." }, { "role": "assistant", "content": "#!/usr/bin/env bash\ns...
script
xargs
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "list only the .css files in /srv/www" }, { "role": "assistant", "content": "ls /srv/www | grep '\\.css$'" } ]
pipeline
ls
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Write a shell script that converts every .png in the current directory to .jpg using ImageMagick, keeping originals." }, { "role": "assistant", ...
script
for
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Show the top 10 most frequent values in field 3 of the whitespace-separated file api.log." }, { "role": "assistant", "content": "awk '{print $3}' api....
pipeline
awk
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Run 'make -j4' niced to 19 in the background." }, { "role": "assistant", "content": "nice -n 19 make -j4 &" } ]
single
nice
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "give the owner rwx and everyone else read on manifest.xml" }, { "role": "assistant", "content": "chmod 744 manifest.xml" } ]
single
chmod
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Find the running elasticsearch processes (excluding the grep itself)." }, { "role": "assistant", "content": "ps aux | grep [e]lasticsearch" } ]
pipeline
ps
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Start 'find / -name '*.core'' with nice value 15 so it doesn't hog the CPU." }, { "role": "assistant", "content": "nice -n 15 find / -name '*.core'" ...
single
nice
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "In users.tsv, which 5 values of column 7 occur most often?" }, { "role": "assistant", "content": "cut -d, -f7 users.tsv | sort | uniq -c | sort -...
pipeline
cut
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Check what holds port 11211 with ss." }, { "role": "assistant", "content": "ss -tlnp sport = :11211" } ]
single
ss
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "I need a retry wrapper around git fetch from origin: 3 attempts, 5s apart." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nmax=3\ndelay=5\nfor attempt in $(seq 1 \"...
script
git
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "give the owner rwx and everyone else read on response.png" }, { "role": "assistant", "content": "chmod 744 response.png" } ]
single
chmod
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Back up logs to /backup as a dated gzip archive, pruning all but the last 10 backups." }, { "role": "assistant", "content": "#!/usr/bin/env bash...
script
tar
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Write a small script that renames every .JPG file in the current directory to .html." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -...
script
for
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Create a script that checks whether haproxy is running and starts it if not." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -eu...
script
if
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Test if output.py is present and has content; report missing, empty, or its line count." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nse...
script
if
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Move customer.tar.gz into the fixtures folder." }, { "role": "assistant", "content": "mv customer.tar.gz fixtures/" } ]
single
mv
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Replace every occurrence of 'POST' with 'staging' in payment.json and print the result." }, { "role": "assistant", "content": "sed 's/POST/stagi...
single
sed
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Create a gzip-compressed archive of the lib directory." }, { "role": "assistant", "content": "tar -czf lib.tar.gz lib" } ]
single
tar
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "what are the top 200 lines in nginx-access.log?" }, { "role": "assistant", "content": "head -n 200 nginx-access.log" } ]
single
head
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Display the ancestors of process 2617 as a tree." }, { "role": "assistant", "content": "pstree -s 2617" } ]
single
pstree
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "From request.txt, convert everything to uppercase." }, { "role": "assistant", "content": "cat request.txt | tr 'a-z' 'A-Z'" } ]
pipeline
tr
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "which directories under templates are eating the most space?" }, { "role": "assistant", "content": "du -h --max-depth=1 templates | sort -rh" ...
pipeline
du
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "extract all the 'name' fields from https://monitor.corp.net/api/users" }, { "role": "assistant", "content": "curl -s https://monitor.corp.net/api...
pipeline
curl
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "change permissions to 644 on all files under assets" }, { "role": "assistant", "content": "find assets -type f -print0 | xargs -0 chmod 644" } ]
pipeline
find
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Help me total the resident memory of all apache2 processes in MB." }, { "role": "assistant", "content": "ps -C apache2 -o rss= | awk '{s+=$1} END...
pipeline
ps
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Find all .txt files under uploads." }, { "role": "assistant", "content": "find uploads -type f -name '*.txt'" } ]
single
find
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Read data.txt, then keep only non-empty lines — as a pipeline." }, { "role": "assistant", "content": "cat data.txt | grep -v '^$'" } ]
pipeline
grep
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Test if session.xml is present and has content; report missing, empty, or its line count." }, { "role": "assistant", "content": "#!/usr/bin/env b...
script
if
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Write a Bash script that dumps every MySQL database into its own gzip file under /srv/backup, keeping 30 days." }, { "role": "assistant", "conte...
script
mysqldump
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Determine the file type of archive.css." }, { "role": "assistant", "content": "file archive.css" } ]
single
file
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Search apt for packages matching bat." }, { "role": "assistant", "content": "apt search bat" } ]
single
apt
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Back up all PostgreSQL databases individually to /var/backups as compressed dumps." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nse...
script
pg_dump
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "I need a script that verifies the environment variables REDIS_URL, PORT and ENV are all set before running." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nfor var ...
script
env
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Find the biggest files under cache." }, { "role": "assistant", "content": "du -ah cache | sort -rh | head -n 20" } ]
pipeline
du
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Can you write a script that deletes .gz files older than 180 days from uploads and logs what it removed?" }, { "role": "assistant", "content": "...
script
find
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Test if data.txt is present and has content; report missing, empty, or its line count." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset...
script
if
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "get the number of items in the JSON array at https://1.1.1.1/api/items" }, { "role": "assistant", "content": "curl -s https://1.1.1.1/api/items | jq '...
pipeline
curl
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Can you write a script that checks a list of required commands (git, curl, jq) are installed before continuing?" }, { "role": "assistant", "content": ...
script
command
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Report virtual-memory statistics every 10 seconds, 10 times." }, { "role": "assistant", "content": "vmstat 10 10" } ]
single
vmstat
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "strip leading whitespace from every line of index.txt and save to clean.txt" }, { "role": "assistant", "content": "sed 's/^[[:space:]]*//' index...
pipeline
sed
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "In inventory.csv, which 15 values of column 2 occur most often?" }, { "role": "assistant", "content": "cut -d, -f2 inventory.csv | sort | uniq -c...
pipeline
cut
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "gzip every .log file under /etc/apache2" }, { "role": "assistant", "content": "find /etc/apache2 -type f -name '*.log' -print0 | xargs -0 gzip" } ]
pipeline
find
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "List sessions with destination www.service.io." }, { "role": "assistant", "content": "ss -tn dst www.service.io" } ]
single
ss
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Show the last 20 lines of settings.txt." }, { "role": "assistant", "content": "tail -n 20 settings.txt" } ]
single
tail
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Fail fast if any of ENV, REDIS_URL, DB_PASS is unset — write it as a bash guard." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset ...
script
env
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "What are the 5 largest subdirectories of media?" }, { "role": "assistant", "content": "du -h media/* 2>/dev/null | sort -rh | head -n 5" } ]
pipeline
du
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Can you write a script that checks whether mongod is running and starts it if not?" }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\npr...
script
if
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Find the 10 most common 'denied'-related lines in metrics.log." }, { "role": "assistant", "content": "grep 'denied' metrics.log | sort | uniq -c ...
pipeline
grep
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Write me a script that creates a temp working directory and cleans it up on exit using a trap." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nworkdir=\"$(mktemp -d...
script
trap
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "I need per-database PostgreSQL backups written to /srv/backup and pruned after 7 days." }, { "role": "assistant", "content": "#!/usr/bin/env bas...
script
pg_dump
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Clean up /var/tmp: remove .bak files not modified in 7 days, recording each deletion." }, { "role": "assistant", "content": "#!/usr/bin/env bash\...
script
find
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "give the owner rwx and everyone else read on index.old" }, { "role": "assistant", "content": "chmod 744 index.old" } ]
single
chmod
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Create an empty file named transaction.js." }, { "role": "assistant", "content": "touch transaction.js" } ]
single
touch
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Make 7 day-stamped folders under /data/backup using a for loop over a date range." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nbase=/data/backup\nfor i in $(seq ...
script
for
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Read build.ini, then strip trailing whitespace — as a pipeline." }, { "role": "assistant", "content": "cat build.ini | sed 's/[[:space:]]*$//'" ...
pipeline
sed
[ { "role": "system", "content": "You translate natural-language requests into correct Bash commands." }, { "role": "user", "content": "Write a health-check loop over nodes.txt that curls the /health endpoint and prints the status of each." }, { "role": "assistant", "content": "#!/usr/...
script
curl
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "I need getopts handling for three options: -i, -c and -t; print usage on bad input." }, { "role": "assistant", "content": "#!/usr/bin/env bash\ns...
script
getopts
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "I need a retry wrapper around curl to https://web01.local/health: 4 attempts, 2s apart." }, { "role": "assistant", "content": "#!/usr/bin/env bas...
script
curl
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Case-insensitively find 'Connection refused' in api.log." }, { "role": "assistant", "content": "grep -i 'Connection refused' api.log" } ]
single
grep
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Restart mongod mariadb rabbitmq one after another and report each result." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nfor svc in ...
script
for
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Find the 10 most common 'invalid'-related lines in audit.log." }, { "role": "assistant", "content": "grep 'invalid' audit.log | sort | uniq -c | ...
pipeline
grep
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Write a shell script that dumps every MySQL database into its own gzip file under /data/backup, keeping 3 days." }, { "role": "assistant", "content": "#!/usr/bin/en...
script
mysqldump
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "list the distinct error messages in auth.log" }, { "role": "assistant", "content": "grep -i error auth.log | sort -u" } ]
pipeline
grep
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Take credentials.yaml and show the last 15 lines." }, { "role": "assistant", "content": "cat credentials.yaml | tail -n 15" } ]
pipeline
tail
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Search nginx-error.log for lines containing '500'." }, { "role": "assistant", "content": "grep '500' nginx-error.log" } ]
single
grep
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Count how often each column-3 value appears in inventory.tsv; show the 15 most common." }, { "role": "assistant", "content": "awk '{print $3}' in...
pipeline
awk
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "I need getopts handling for three options: -n, -c and -t; print usage on bad input." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nn...
script
getopts
[ { "role": "system", "content": "You are a Linux shell expert. Respond with Bash only." }, { "role": "user", "content": "Write a script that parses -f (file), -n (count) and -v (verbose) options with getopts." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefai...
script
getopts
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "which directories under tmp are eating the most space?" }, { "role": "assistant", "content": "du -h --max-depth=1 tmp | sort -rh" } ]
pipeline
du
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "move all .sql files into the bin directory" }, { "role": "assistant", "content": "mv *.sql bin/" } ]
single
mv
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "From syslog, list the 25 most frequent field-4 entries with their counts." }, { "role": "assistant", "content": "awk '{print $4}' syslog | sort | uniq -c | sort -nr | head -n 25" } ]
pipeline
awk
[ { "role": "system", "content": "You are a Bash expert." }, { "role": "user", "content": "Write me a script that alerts if the root filesystem is more than 85% full." }, { "role": "assistant", "content": "#!/usr/bin/env bash\nset -euo pipefail\nthreshold=85\nusage=$(df / | awk 'NR==2 ...
script
if
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "Display the ancestors of process 5362 as a tree." }, { "role": "assistant", "content": "pstree -s 5362" } ]
single
pstree
[ { "role": "system", "content": "You are a command-line assistant specializing in Bash and GNU coreutils." }, { "role": "user", "content": "Take data.log and convert everything to uppercase." }, { "role": "assistant", "content": "cat data.log | tr 'a-z' 'A-Z'" } ]
pipeline
tr
[ { "role": "system", "content": "You are a helpful assistant that writes correct, idiomatic Bash commands." }, { "role": "user", "content": "How do I count how many sshd processes are running?" }, { "role": "assistant", "content": "pgrep -c sshd" } ]
pipeline
pgrep