system
stringclasses
1 value
user
stringlengths
5
1.56k
assistant
stringlengths
2
1.57k
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show the total uncompressed size of files in media.7z.
7z l -ba "media.7z" | awk '{sum += $4} END {print sum}'
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
List files in data.7z and show only the file sizes in human-readable format.
7z l -ba "data.7z" | awk '{print $4, $NF}' | numfmt --to=iec --field=1
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show the manual page for tar.
man tar
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
How do I read the man page for grep?
man grep
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
open man for rsync
man rsync
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show the number of CPUs.
nproc
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
How many CPU cores does this machine have?
nproc
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
print cpu count
nproc
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use nice with -n 10 to run make with low priority.
nice -n 10 make
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run make at nice level 10.
nice -n 10 make
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Start make with nice -n 10.
nice -n 10 make
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use ionice with -c 3 and -n 7 to run backup.sh at idle IO priority.
ionice -c 3 -n 7 "./backup.sh"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run backup.sh with idle IO class and level 7.
ionice -c 3 -n 7 "./backup.sh"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Execute backup.sh under ionice idle class.
ionice -c 3 -n 7 "./backup.sh"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use env with -i and -u to run printenv with a clean env minus HOME.
env -i -u HOME printenv
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run printenv with an empty environment except removing HOME.
env -i -u HOME printenv
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use env -i -u HOME to invoke printenv cleanly.
env -i -u HOME printenv
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use mapfile with -d '' to load NUL-separated items from list.bin into an array.
mapfile -d '' -t items < "list.bin" && printf '%s\n' "${items[@]}"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Load NUL-delimited list.bin into a bash array with mapfile.
mapfile -d '' -t items < "list.bin" && printf '%s\n' "${items[@]}"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use mapfile -d '' -t to read list.bin into items array.
mapfile -d '' -t items < "list.bin" && printf '%s\n' "${items[@]}"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt -s globstar and nullglob to list all .log files recursively.
shopt -s globstar nullglob for f in ./**/*.log; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Recursively list .log files using globstar and nullglob.
shopt -s globstar nullglob for f in ./**/*.log; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Enable globstar and nullglob then iterate all .log files.
shopt -s globstar nullglob for f in ./**/*.log; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use printf with -v to assign formatted text to a variable.
printf -v msg '%s-%s' 'app' '01' printf '%s\n' "$msg"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Assign a formatted string to msg using printf -v.
printf -v msg '%s-%s' 'app' '01' printf '%s\n' "$msg"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use printf -v to build a variable from two parts.
printf -v msg '%s-%s' 'app' '01' printf '%s\n' "$msg"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use ulimit with -n to show the open file descriptor limit.
ulimit -n
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Print the max open files ulimit.
ulimit -n
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show the file descriptor soft limit via ulimit -n.
ulimit -n
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use command with -v to check if 'git' is available.
command -v git >/dev/null 2>&1 && echo 'git found' || echo 'git missing'
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Check for git using command -v.
command -v git >/dev/null 2>&1 && echo 'git found' || echo 'git missing'
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use command -v git to test availability.
command -v git >/dev/null 2>&1 && echo 'git found' || echo 'git missing'
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use hash with -t to show the path of the cached 'ls' command.
hash -t ls
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show the hashed path for ls using hash -t.
hash -t ls
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use hash -t ls to print the cached location.
hash -t ls
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt with -s lastpipe to run the last pipeline stage in the current shell.
shopt -s lastpipe echo 'a b' | read -r x y printf '%s %s\n' "$x" "$y"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Enable lastpipe so read in a pipeline sets variables.
shopt -s lastpipe echo 'a b' | read -r x y printf '%s %s\n' "$x" "$y"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt -s lastpipe to make the final pipe stage run in current shell.
shopt -s lastpipe echo 'a b' | read -r x y printf '%s %s\n' "$x" "$y"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt with -s failglob to error on unmatched globs.
shopt -s failglob for f in ./*.nomatch; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Enable failglob so unmatched patterns cause an error.
shopt -s failglob for f in ./*.nomatch; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt -s failglob before a glob loop.
shopt -s failglob for f in ./*.nomatch; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt with -s dotglob to include hidden files in globs.
shopt -s dotglob nullglob for f in ./*; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Include dotfiles in a glob loop using dotglob.
shopt -s dotglob nullglob for f in ./*; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt -s dotglob nullglob then iterate ./*.
shopt -s dotglob nullglob for f in ./*; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt with -s nocaseglob to match files case-insensitively.
shopt -s nocaseglob nullglob for f in ./*.TXT; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Match *.TXT case-insensitively using nocaseglob.
shopt -s nocaseglob nullglob for f in ./*.TXT; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt -s nocaseglob for case-insensitive globbing.
shopt -s nocaseglob nullglob for f in ./*.TXT; do printf '%s\n' "$f"; done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt with -s extdebug to enable function tracing.
shopt -s extdebug trap 'echo "trap: $BASH_COMMAND"' DEBUG echo 'hi' shopt -u extdebug
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Enable extdebug and a DEBUG trap to trace commands.
shopt -s extdebug trap 'echo "trap: $BASH_COMMAND"' DEBUG echo 'hi' shopt -u extdebug
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use shopt -s extdebug with a DEBUG trap.
shopt -s extdebug trap 'echo "trap: $BASH_COMMAND"' DEBUG echo 'hi' shopt -u extdebug
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use compgen with -c to list all commands starting with 'git'.
compgen -c git | sort -u
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
List commands beginning with git using compgen -c.
compgen -c git | sort -u
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use compgen -c git to enumerate git* commands.
compgen -c git | sort -u
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use compgen with -A function to list defined shell functions.
compgen -A function | sort
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
List all shell function names with compgen -A function.
compgen -A function | sort
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use compgen -A function to enumerate functions.
compgen -A function | sort
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use complete with -p to print current completion specs.
complete -p
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show all registered bash completion specs.
complete -p
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use complete -p to list completion definitions.
complete -p
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use fc with -l and -n to list recent history without numbers.
fc -ln -10
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
List the last 10 history commands without line numbers using fc.
fc -ln -10
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use fc -ln -10 to show recent commands unnumbered.
fc -ln -10
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show the dir stack with indices using dirs -v.
pushd /tmp >/dev/null pushd /var >/dev/null dirs -v popd >/dev/null popd >/dev/null
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use dirs -v after pushing /tmp and /var.
pushd /tmp >/dev/null pushd /var >/dev/null dirs -v popd >/dev/null popd >/dev/null
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use pushd with -n to add a dir to the stack without changing cwd.
pushd -n /tmp >/dev/null dirs -v popd >/dev/null
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Add /tmp to the dir stack without cd using pushd -n.
pushd -n /tmp >/dev/null dirs -v popd >/dev/null
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use pushd -n /tmp to push without switching directory.
pushd -n /tmp >/dev/null dirs -v popd >/dev/null
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use a while loop to retry a command up to 3 times until it succeeds.
n=0 until some_command; do n=$((n + 1)) [ "$n" -ge 3 ] && break done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
How do I retry a failing command a few times in bash?
n=0 until some_command; do n=$((n + 1)) [ "$n" -ge 3 ] && break done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Give me a retry loop with a max attempt count.
n=0 until some_command; do n=$((n + 1)) [ "$n" -ge 3 ] && break done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run an R script and limit memory usage with ulimit.
ulimit -v 2000000 && Rscript script.R
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Execute an R script with a memory cap.
ulimit -v 2000000 && Rscript script.R
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
How do I run an R script and notify on completion?
Rscript script.R && notify-send "R script done"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run an R script and send a desktop notification when finished.
Rscript script.R && notify-send "R script done"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run an R script and split output into chunks of 1000 lines.
Rscript script.R | split -l 1000 - output_part_
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
How to run an R script and split its output into files?
Rscript script.R | split -l 1000 - output_part_
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run heavy.R with Rscript using nice priority 10.
nice -n 10 Rscript heavy.R
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Execute heavy.R via Rscript at lower scheduling priority.
nice -n 10 Rscript heavy.R
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Start heavy.R with Rscript under nice -n 10.
nice -n 10 Rscript heavy.R
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run script.R with Rscript and pass the number of CPUs as an argument.
Rscript script.R "$(nproc)"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Execute script.R via Rscript with nproc as its argument.
Rscript script.R "$(nproc)"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Rscript script.R, argument being the CPU count.
Rscript script.R "$(nproc)"
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Run Rscript d.R and split its output into 100-line chunks named chunk_aa, chunk_ab, etc.
Rscript d.R | split -l 100 - chunk_
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Split d.R output into 100-line files with prefix chunk_.
Rscript d.R | split -l 100 - chunk_
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Execute d.R with Rscript and split the stream every 100 lines into chunk_* files.
Rscript d.R | split -l 100 - chunk_
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show the manual page for the ls command.
man ls
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
open the man page for ls
man ls
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
how do I read the manual for ls
man ls
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Show a short description of the tar command.
whatis tar
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
one-line summary of tar
whatis tar
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
what does tar do briefly
whatis tar
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Check if a command exists, exit 127 if not.
if ! command -v jq >/dev/null 2>&1; then echo "jq not found" >&2 exit 127 fi
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Exit with code 1 if a command is not found.
if ! command -v nonexistentcmd >/dev/null 2>&1; then echo "not found" >&2 exit 1 fi
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Exit with code 1 if a file is not a regular file with a specific extended attribute.
f="/etc/hosts" if [[ ! -f "$f" || -z "$(getfattr -d -- "$f" 2>/dev/null)" ]]; then echo "no xattr: $f" >&2 exit 1 fi
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Check the sudoers file syntax with visudo in check mode.
sudo visudo -c
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Validate /etc/sudoers without editing it, using root.
sudo visudo -c
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Use sudo visudo -c to verify sudoers syntax.
sudo visudo -c
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
sum up wc -l for all *.conf under /etc ignoring unreadable ones
sum up wc -l for all *.conf under /etc ignoring unreadable ones find /etc -type f -name '*.conf' -readable -print0 | xargs -0 wc -l | awk 'END{print "TOTAL", $1}'
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
Retry a command up to 5 times until it succeeds, sleeping 2 seconds between attempts.
n=0 until "$@" || (( n >= 5 )); do n=$(( n + 1 )) sleep 2 done
You are an expert Linux shell assistant. Convert the user's natural-language request into a single, correct bash command that accomplishes it. Prefer standard, widely available tools and POSIX-compatible syntax. Quote file names and paths that may contain spaces. Respond with only the command, with no explanation or ma...
write a retry loop: run command, max 5 tries, 2s sleep between
n=0 until "$@" || (( n >= 5 )); do n=$(( n + 1 )) sleep 2 done