text large_stringlengths 242 1.17k | nl large_stringlengths 13 387 | bash large_stringlengths 1 715 | source large_stringclasses 3
values |
|---|---|---|---|
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system kernel errors and send an alert if any are found.<|im_end|>
<|im_start|>assistant
#!/bin/bash
kernel_errors... | Create a script to monitor system kernel errors and send an alert if any are found. | #!/bin/bash
kernel_errors=$(dmesg | grep 'error' | wc -l)
if [ "$kernel_errors" -gt 0 ]; then
echo "System kernel errors detected."
# Send alert here
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Monitor system network interface errors, drops, and FIFO errors every 5 seconds for 1 minute and display the results.<|im_end|>
<|im_start|>as... | Monitor system network interface errors, drops, and FIFO errors every 5 seconds for 1 minute and display the results. | #!/bin/bash
for ((i=0; i<12; i++)); do
sar -n EDEV 5 6
sar -n DEV 5 6
sar -n SOCK 5 6
sleep 5
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
set alias "unix" for command "date +%s"<|im_end|>
<|im_start|>assistant
alias unix="date +%s"<|im_end|> | set alias "unix" for command "date +%s" | alias unix="date +%s" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script that monitors system network traffic and alerts if any interface exceeds a certain threshold.<|im_end|>
<|im_start|>assistant
... | Create a script that monitors system network traffic and alerts if any interface exceeds a certain threshold. | #!/bin/bash
threshold=10M
while true; do
netstat -i | awk '$2 > "$threshold" {print $1, $2}'
sleep 60
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Updates all packages with 'rpmfusion' in name.<|im_end|>
<|im_start|>assistant
yum update $<|im_end|> | Updates all packages with 'rpmfusion' in name. | yum update $ | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Check if a string starts with a specific prefix.<|im_end|>
<|im_start|>assistant
#!/bin/bash
string="your_string"
prefix="your"
if [[ "$stri... | Check if a string starts with a specific prefix. | #!/bin/bash
string="your_string"
prefix="your"
if [[ "$string" == "$prefix"* ]]; then
echo "$string starts with $prefix"
else
echo "$string does not start with $prefix"
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Display unique names of logged in users<|im_end|>
<|im_start|>assistant
finger | sed 's/\t/ /' | sed 's/pts\/[0-9]* *[0-9]*//' | awk '{print $... | Display unique names of logged in users | finger | sed 's/\t/ /' | sed 's/pts\/[0-9]* *[0-9]*//' | awk '{print $2"\t("$1")\t"$3" "$4" "$5}' | sort | uniq | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all files/directories under current directory and run ipython nbconvert for each of them with the file/directory path as a argument by ch... | Find all files/directories under current directory and run ipython nbconvert for each of them with the file/directory path as a argument by changing into the parent directory | find -execdir ipython nbconvert {} \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to generate a random password.<|im_end|>
<|im_start|>assistant
#!/bin/bash
password=$(openssl rand -base64 12)
echo "Generate... | Create a script to generate a random password. | #!/bin/bash
password=$(openssl rand -base64 12)
echo "Generated Password: $password" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all directories under current directory and run ./script.sh for each of them<|im_end|>
<|im_start|>assistant
find . -type d -exec ./scrip... | Find all directories under current directory and run ./script.sh for each of them | find . -type d -exec ./script.sh {} \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print lines that only unique ones in 'set1' and 'set2' files<|im_end|>
<|im_start|>assistant
cat < <<|im_end|> | Print lines that only unique ones in 'set1' and 'set2' files | cat < < | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
For each line in 'file', print "result = " followed by the line backwards.<|im_end|>
<|im_start|>assistant
awk '{print "result =",$0}' <(rev f... | For each line in 'file', print "result = " followed by the line backwards. | awk '{print "result =",$0}' <(rev file) | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Write output of "command_that_writes_to_stdout" to standard output and as input to "command_that_reads_from_stdin"<|im_end|>
<|im_start|>assis... | Write output of "command_that_writes_to_stdout" to standard output and as input to "command_that_reads_from_stdin" | command_that_writes_to_stdout | tee > | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Find all Lemon*.mp3 files under current directory and run mplayer with these files<|im_end|>
<|im_start|>assistant
find . -name 'Lemon*.mp3' -... | Find all Lemon*.mp3 files under current directory and run mplayer with these files | find . -name 'Lemon*.mp3' -exec mplayer {} ';' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Search the current directory tree for files whose name is ".note", case insensitive<|im_end|>
<|im_start|>assistant
find . -iname '.note' | so... | Search the current directory tree for files whose name is ".note", case insensitive | find . -iname '.note' | sort | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
search for all the Joomla's version.php files in various directories and display the latest versions of it.<|im_end|>
<|im_start|>assistant
fi... | search for all the Joomla's version.php files in various directories and display the latest versions of it. | find /var/www/vhosts/*/httpdocs -type f \ -print0 -exec perl -e 'while { $release = $1 if m/ \$RELEASE\s+= ..;/; $dev = $1 if m/ \$DEV_LEVEL\s+= ..;/; } print qq;' {} \; | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Execute "chown -R ask:ask /www/askapache.com" in the background on server "askapache" with a niceness of 19<|im_end|>
<|im_start|>assistant
ss... | Execute "chown -R ask:ask /www/askapache.com" in the background on server "askapache" with a niceness of 19 | ssh askapache 'nice -n 19 sh -c "( & )"' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Check if a specific file exists and is larger than 1GB.<|im_end|>
<|im_start|>assistant
#!/bin/bash
file="/path/to/file"
if [ -e "$file" ] &... | Check if a specific file exists and is larger than 1GB. | #!/bin/bash
file="/path/to/file"
if [ -e "$file" ] && [ $(stat -c%s "$file") -gt 1073741824 ]; then
echo "$file exists and is larger than 1GB"
else
echo "$file does not exist or is not larger than 1GB"
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print the total disk usage in bytes of all files listed in "files.txt"<|im_end|>
<|im_start|>assistant
cat files.txt | xargs du -c | tail -1 |... | Print the total disk usage in bytes of all files listed in "files.txt" | cat files.txt | xargs du -c | tail -1 | awk '{print $1}' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
remove a specific file among a group of specific files<|im_end|>
<|im_start|>assistant
find . -name "*.pdf" -print | grep -v "^\./pdfs/" | xar... | remove a specific file among a group of specific files | find . -name "*.pdf" -print | grep -v "^\./pdfs/" | xargs -J X mv X ./pdfs/ | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to convert all filenames in a directory to lowercase.<|im_end|>
<|im_start|>assistant
#!/bin/bash
for file in *; do
if [ ... | Create a script to convert all filenames in a directory to lowercase. | #!/bin/bash
for file in *; do
if [ -f "$file" ]; then
mv "$file" "$(echo "$file" | tr '[:upper:]' '[:lower:]')"
fi
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Recursively search for "string here" and write the output to the console followed by the number of matched lines<|im_end|>
<|im_start|>assista... | Recursively search for "string here" and write the output to the console followed by the number of matched lines | grep -r "string here" * | tee > | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Write output of "foo" to standard output and to "output.file"<|im_end|>
<|im_start|>assistant
foo | tee output.file<|im_end|> | Write output of "foo" to standard output and to "output.file" | foo | tee output.file | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script that monitors system process execution and logs any attempts to execute blacklisted commands.<|im_end|>
<|im_start|>assistant
... | Create a script that monitors system process execution and logs any attempts to execute blacklisted commands. | #!/bin/bash
while true; do
history | awk '{print $2}' | grep -iE 'rm|reboot|shutdown|format' && echo "Blacklisted command executed"
sleep 300
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
use find command to search for .png and .jpg files<|im_end|>
<|im_start|>assistant
find ./ -type f \<|im_end|> | use find command to search for .png and .jpg files | find ./ -type f \ | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
find all the instances of the file "foo.txt" in the current folder and move them to another folder<|im_end|>
<|im_start|>assistant
find . -nam... | find all the instances of the file "foo.txt" in the current folder and move them to another folder | find . -name foo.txt 1> tmpfile && mv `cat tmpfile` path/to/some/dir && rm tmpfile | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Decompress and sort "$part0" and "$part1" of files in different processes<|im_end|>
<|im_start|>assistant
sort -m < <<|im_end|> | Decompress and sort "$part0" and "$part1" of files in different processes | sort -m < < | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
List all SGID and SUID files in entire file system<|im_end|>
<|im_start|>assistant
find / -type f \( -perm -4000 -o -perm -2000 \) -ls<|im_end... | List all SGID and SUID files in entire file system | find / -type f \( -perm -4000 -o -perm -2000 \) -ls | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Recursively finds last 5 modified files in a directory<|im_end|>
<|im_start|>assistant
find . -type f -ls 2>/dev/null | sort -M -k8,10 | head ... | Recursively finds last 5 modified files in a directory | find . -type f -ls 2>/dev/null | sort -M -k8,10 | head -n5 | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
reverse both words and lines in file<|im_end|>
<|im_start|>assistant
tac filename | awk '{for (i=NF; i>1; i--) printf("%s ",$i); printf("%s\n"... | reverse both words and lines in file | tac filename | awk '{for (i=NF; i>1; i--) printf("%s ",$i); printf("%s\n",$1)}' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Updates all software in a system, skipping packages that have a failed dependencies.<|im_end|>
<|im_start|>assistant
sudo yum update --skip-br... | Updates all software in a system, skipping packages that have a failed dependencies. | sudo yum update --skip-broken | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print the list of files in a directory with their sizes and last access times sorted by last access time in reverse order.<|im_end|>
<|im_star... | Print the list of files in a directory with their sizes and last access times sorted by last access time in reverse order. | #!/bin/bash
ls -l --time-style=long-iso /path/to/your/directory | awk '{print $5, $6, $7, $8, $9}' | sort -k 4 -r | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Removes 55, adds a 10-digit line number, and rearranges the date for each line in "input"<|im_end|>
<|im_start|>assistant
nl -nrz -w10 -s\; in... | Removes 55, adds a 10-digit line number, and rearranges the date for each line in "input" | nl -nrz -w10 -s\; input | sed -r 's/55//; s/--/\3\2\1/' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Monitor system disk I/O activity every 10 seconds for 1 minute and display the results.<|im_end|>
<|im_start|>assistant
#!/bin/bash
for ((i=0... | Monitor system disk I/O activity every 10 seconds for 1 minute and display the results. | #!/bin/bash
for ((i=0; i<6; i++)); do
iostat -x 10 6
sleep 10
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Remove a leading "machine" from the system host name and save the result to variable "machnum"<|im_end|>
<|im_start|>assistant
machnum=$<|im_e... | Remove a leading "machine" from the system host name and save the result to variable "machnum" | machnum=$ | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Page through extended information about all PCI devices on system.<|im_end|>
<|im_start|>assistant
lspci -v -v | less<|im_end|> | Page through extended information about all PCI devices on system. | lspci -v -v | less | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Send SIGKILL signal to all processes whose command matches "csp_build"<|im_end|>
<|im_start|>assistant
kill -9 `pgrep -f cps_build`<|im_end|> | Send SIGKILL signal to all processes whose command matches "csp_build" | kill -9 `pgrep -f cps_build` | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Archive all filepattern-*2009* files/directories under data/ into 2009.tar<|im_end|>
<|im_start|>assistant
find data -xdev -name "filepattern-... | Archive all filepattern-*2009* files/directories under data/ into 2009.tar | find data -xdev -name "filepattern-*2009*" -print0 | tar --null --no-recursion -uf 2009.tar --files-from - | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Check whether current terminal is opened in a screen session.<|im_end|>
<|im_start|>assistant
pstree --show-parents -p $$ | head -n 1 | sed 's... | Check whether current terminal is opened in a screen session. | pstree --show-parents -p $$ | head -n 1 | sed 's/\(.*\)+.*/\1/' | grep screen | wc -l | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Delete every second line from output of "seq 10"<|im_end|>
<|im_start|>assistant
seq 10 | sed '0~2d'<|im_end|> | Delete every second line from output of "seq 10" | seq 10 | sed '0~2d' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system RAID array health and generate reports on disk failures.<|im_end|>
<|im_start|>assistant
#!/bin/bash
touch ... | Create a script to monitor system RAID array health and generate reports on disk failures. | #!/bin/bash
touch /tmp/raid_health_report.txt
while true; do
mdadm --detail /dev/md0 >> /tmp/raid_health_report.txt
sleep 3600
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Counts the number of lines in each *.java file in a git repository.<|im_end|>
<|im_start|>assistant
git ls-files | grep "\.java$" | xargs wc -... | Counts the number of lines in each *.java file in a git repository. | git ls-files | grep "\.java$" | xargs wc -l | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Installs 'glibc' package.<|im_end|>
<|im_start|>assistant
sudo yum install glibc<|im_end|> | Installs 'glibc' package. | sudo yum install glibc | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system network traffic and send an alert if it exceeds a certain threshold.<|im_end|>
<|im_start|>assistant
#!/bin/... | Create a script to monitor system network traffic and send an alert if it exceeds a certain threshold. | #!/bin/bash
threshold=1
traffic=$(netstat -i | awk '{print $5}' | grep -v 'bytes')
if [ "$traffic" -gt "$threshold" ]; then
echo "System network traffic exceeds $threshold%."
# Send alert here
fi | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
display a long listing of all the files in the current folder which have spaces in their names and save the output to the file log.txt<|im_end... | display a long listing of all the files in the current folder which have spaces in their names and save the output to the file log.txt | find . -name "filename including space" -print0 | xargs -0 ls -aldF > log.txt | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Count the number of "x" characters in "filename"<|im_end|>
<|im_start|>assistant
sed 's/[^x]//g' filename | tr -d '\012' | wc -c<|im_end|> | Count the number of "x" characters in "filename" | sed 's/[^x]//g' filename | tr -d '\012' | wc -c | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system process memory usage and send an alert if any process exceeds a certain memory usage.<|im_end|>
<|im_start|>... | Create a script to monitor system process memory usage and send an alert if any process exceeds a certain memory usage. | #!/bin/bash
threshold="500"
processes=$(ps aux --sort=-%mem | awk 'NR<=5{print $11}')
while read -r process; do
mem_usage=$(ps -C "$process" --no-headers -o %mem | awk '{print $1}')
if [ "$mem_usage" -gt "$threshold" ]; then
echo "Process $process is consuming high memory: $mem_usage KB" | mail -s "H... | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to monitor system file permissions and send alerts if any files are world-writable.<|im_end|>
<|im_start|>assistant
#!/bin/bas... | Create a script to monitor system file permissions and send alerts if any files are world-writable. | #!/bin/bash
find / -perm -o+w | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Save the list of all subdirectories of the current directory as "dirs_to_remove"<|im_end|>
<|im_start|>assistant
find . -maxdepth 1 -type d > ... | Save the list of all subdirectories of the current directory as "dirs_to_remove" | find . -maxdepth 1 -type d > dirs_to_remove | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script that monitors system GPU temperature and logs any temperature spikes.<|im_end|>
<|im_start|>assistant
#!/bin/bash
while true;... | Create a script that monitors system GPU temperature and logs any temperature spikes. | #!/bin/bash
while true; do
nvidia-smi --query-gpu=temperature.gpu --format=csv,noheader > /tmp/gpu_temp.txt
sleep 300
analyze_gpu_temp
sleep 300
done | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Print the list of files in the current directory tree excluding those whose paths contain "exclude3" or "exclude4"<|im_end|>
<|im_start|>assis... | Print the list of files in the current directory tree excluding those whose paths contain "exclude3" or "exclude4" | find . | egrep -v "" | sort | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Replace the leading spaces in the output of "history" with periods<|im_end|>
<|im_start|>assistant
history | sed 's/^ */&\n/; :a; s/ \/.\1/; t... | Replace the leading spaces in the output of "history" with periods | history | sed 's/^ */&\n/; :a; s/ \/.\1/; ta; s/\n//' | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Run the node expression "JSON.parse.foo" on the contents of "foobar.json"<|im_end|>
<|im_start|>assistant
node -pe 'JSON.parse.foo' "$"<|im_en... | Run the node expression "JSON.parse.foo" on the contents of "foobar.json" | node -pe 'JSON.parse.foo' "$" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
run command "exec > > 2>&1 ; cd $WKD; { $BIN $ARG & }; echo \$! > $PID " as user $USR<|im_end|>
<|im_start|>assistant
su -l $USR -s /bin/bash ... | run command "exec > > 2>&1 ; cd $WKD; { $BIN $ARG & }; echo \$! > $PID " as user $USR | su -l $USR -s /bin/bash -c "exec > > 2>&1 ; cd $WKD; { $BIN $ARG & }; echo \$! > $PID " | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
Create a script to generate a random number within a specified range.<|im_end|>
<|im_start|>assistant
#!/bin/bash
min=10
max=50
random_num=$(... | Create a script to generate a random number within a specified range. | #!/bin/bash
min=10
max=50
random_num=$((RANDOM % (max - min + 1) + min))
echo "Random number between $min and $max: $random_num" | AnishJoshi/nl2bash-custom |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
list all installed homebrew packages<|im_end|>
<|im_start|>assistant
brew list<|im_end|> | list all installed homebrew packages | brew list | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
update homebrew and upgrade all packages<|im_end|>
<|im_start|>assistant
brew update && brew upgrade<|im_end|> | update homebrew and upgrade all packages | brew update && brew upgrade | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show disk usage of current directory<|im_end|>
<|im_start|>assistant
du -sh .<|im_end|> | show disk usage of current directory | du -sh . | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
find all Python files modified in the last 24 hours<|im_end|>
<|im_start|>assistant
find . -name '*.py' -mtime -1<|im_end|> | find all Python files modified in the last 24 hours | find . -name '*.py' -mtime -1 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show all running Docker containers<|im_end|>
<|im_start|>assistant
docker ps<|im_end|> | show all running Docker containers | docker ps | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
kill the process using port 3000<|im_end|>
<|im_start|>assistant
lsof -ti:3000 | xargs kill -9<|im_end|> | kill the process using port 3000 | lsof -ti:3000 | xargs kill -9 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
create a new git branch called feature-auth<|im_end|>
<|im_start|>assistant
git checkout -b feature-auth<|im_end|> | create a new git branch called feature-auth | git checkout -b feature-auth | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show git log as one-line summaries<|im_end|>
<|im_start|>assistant
git log --oneline -20<|im_end|> | show git log as one-line summaries | git log --oneline -20 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
compress the src directory into a tar.gz<|im_end|>
<|im_start|>assistant
tar -czf src.tar.gz src/<|im_end|> | compress the src directory into a tar.gz | tar -czf src.tar.gz src/ | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show system memory usage<|im_end|>
<|im_start|>assistant
vm_stat | head -10<|im_end|> | show system memory usage | vm_stat | head -10 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
list all open network connections<|im_end|>
<|im_start|>assistant
lsof -i -P -n | head -20<|im_end|> | list all open network connections | lsof -i -P -n | head -20 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
recursively find files larger than 100MB<|im_end|>
<|im_start|>assistant
find / -size +100M -type f 2>/dev/null<|im_end|> | recursively find files larger than 100MB | find / -size +100M -type f 2>/dev/null | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show the last 50 lines of the system log<|im_end|>
<|im_start|>assistant
tail -50 /var/log/system.log<|im_end|> | show the last 50 lines of the system log | tail -50 /var/log/system.log | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
restart the DNS cache on macOS<|im_end|>
<|im_start|>assistant
sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder<|im_end|> | restart the DNS cache on macOS | sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show all environment variables containing PATH<|im_end|>
<|im_start|>assistant
env | grep PATH<|im_end|> | show all environment variables containing PATH | env | grep PATH | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
count lines of code in all TypeScript files<|im_end|>
<|im_start|>assistant
find . -name '*.ts' | xargs wc -l<|im_end|> | count lines of code in all TypeScript files | find . -name '*.ts' | xargs wc -l | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
check if port 8080 is in use<|im_end|>
<|im_start|>assistant
lsof -i :8080<|im_end|> | check if port 8080 is in use | lsof -i :8080 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show the top 10 largest files in current directory<|im_end|>
<|im_start|>assistant
ls -lhS | head -10<|im_end|> | show the top 10 largest files in current directory | ls -lhS | head -10 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
create an SSH tunnel from local 8080 to remote 80<|im_end|>
<|im_start|>assistant
ssh -L 8080:localhost:80 user@host<|im_end|> | create an SSH tunnel from local 8080 to remote 80 | ssh -L 8080:localhost:80 user@host | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
watch a directory for file changes<|im_end|>
<|im_start|>assistant
fswatch -r . | head -20<|im_end|> | watch a directory for file changes | fswatch -r . | head -20 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
install a package globally with npm<|im_end|>
<|im_start|>assistant
npm install -g package-name<|im_end|> | install a package globally with npm | npm install -g package-name | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
run a Python HTTP server on port 8000<|im_end|>
<|im_start|>assistant
python3 -m http.server 8000<|im_end|> | run a Python HTTP server on port 8000 | python3 -m http.server 8000 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
check SSL certificate expiry of a domain<|im_end|>
<|im_start|>assistant
echo | openssl s_client -connect example.com:443 2>/dev/null | openss... | check SSL certificate expiry of a domain | echo | openssl s_client -connect example.com:443 2>/dev/null | openssl x509 -noout -dates | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
search for a string recursively in all files<|im_end|>
<|im_start|>assistant
grep -r 'search_string' .<|im_end|> | search for a string recursively in all files | grep -r 'search_string' . | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show CPU and memory usage of all processes<|im_end|>
<|im_start|>assistant
top -l 1 | head -20<|im_end|> | show CPU and memory usage of all processes | top -l 1 | head -20 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
generate a random 32-character password<|im_end|>
<|im_start|>assistant
openssl rand -base64 32<|im_end|> | generate a random 32-character password | openssl rand -base64 32 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
download a file with curl and save it<|im_end|>
<|im_start|>assistant
curl -LO https://example.com/file.tar.gz<|im_end|> | download a file with curl and save it | curl -LO https://example.com/file.tar.gz | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show the size of each subdirectory<|im_end|>
<|im_start|>assistant
du -sh */ | sort -rh<|im_end|> | show the size of each subdirectory | du -sh */ | sort -rh | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
list all git branches sorted by last commit date<|im_end|>
<|im_start|>assistant
git branch --sort=-committerdate<|im_end|> | list all git branches sorted by last commit date | git branch --sort=-committerdate | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
set a file as executable<|im_end|>
<|im_start|>assistant
chmod +x script.sh<|im_end|> | set a file as executable | chmod +x script.sh | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show the difference between two files<|im_end|>
<|im_start|>assistant
diff file1.txt file2.txt<|im_end|> | show the difference between two files | diff file1.txt file2.txt | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
find and delete all node_modules directories<|im_end|>
<|im_start|>assistant
find . -name 'node_modules' -type d -prune -exec rm -rf {} +<|im_... | find and delete all node_modules directories | find . -name 'node_modules' -type d -prune -exec rm -rf {} + | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show which process is using the most CPU<|im_end|>
<|im_start|>assistant
ps aux --sort=-%cpu | head -5<|im_end|> | show which process is using the most CPU | ps aux --sort=-%cpu | head -5 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
create a symbolic link<|im_end|>
<|im_start|>assistant
ln -s /path/to/original /path/to/link<|im_end|> | create a symbolic link | ln -s /path/to/original /path/to/link | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
watch the output of a command every 2 seconds<|im_end|>
<|im_start|>assistant
watch -n 2 'command'<|im_end|> | watch the output of a command every 2 seconds | watch -n 2 'command' | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show all listening TCP ports<|im_end|>
<|im_start|>assistant
netstat -tlnp 2>/dev/null || ss -tlnp<|im_end|> | show all listening TCP ports | netstat -tlnp 2>/dev/null || ss -tlnp | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
convert a video to mp4 using ffmpeg<|im_end|>
<|im_start|>assistant
ffmpeg -i input.mov -c:v libx264 -c:a aac output.mp4<|im_end|> | convert a video to mp4 using ffmpeg | ffmpeg -i input.mov -c:v libx264 -c:a aac output.mp4 | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
show git stash list<|im_end|>
<|im_start|>assistant
git stash list<|im_end|> | show git stash list | git stash list | macos-synthetic |
<|im_start|>system
You are an expert shell programmer. Given a natural language request, output ONLY the corresponding shell command. No explanations.<|im_end|>
<|im_start|>user
run a command in the background and disown it<|im_end|>
<|im_start|>assistant
nohup command &>/dev/null & disown<|im_end|> | run a command in the background and disown it | nohup command &>/dev/null & disown | macos-synthetic |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.