Instruction
stringlengths 13
387
| Response
stringlengths 1
532
| Text
stringlengths 158
1.06k
|
---|---|---|
Copy all files named 'script.sh' in directory 'olddir' to directory 'newdir' | find olddir -name script.sh -printf "%p\0" -printf "newdir/%P\0" | xargs -0L2 cp -n | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all files named 'script.sh' in directory 'olddir' to directory 'newdir' ### Response: find olddir -name script.sh -printf "%p\0" -printf "newdir/%P\0" | xargs -0L2 cp -n |
Copy all files that match 'FooBar' in their paths under current directory tree to the '~/foo/bar' directory | find . | grep "FooBar" | tr \\n \\0 | xargs -0 -I{} cp "{}" ~/foo/bar | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all files that match 'FooBar' in their paths under current directory tree to the '~/foo/bar' directory ### Response: find . | grep "FooBar" | tr \\n \\0 | xargs -0 -I{} cp "{}" ~/foo/bar |
Copy all files unconditionally and directories in directory tree "myfiles" to "target-dir" preserving directory hierarchy and modification time | find myfiles | cpio -pmud target-dir | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all files unconditionally and directories in directory tree "myfiles" to "target-dir" preserving directory hierarchy and modification time ### Response: find myfiles | cpio -pmud target-dir |
Copy all files under director 'foo' whose name doesn't contain 'Music' to directory 'bar'. | find foo -type f ! -name '*Music*' -exec cp {} bar \; | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all files under director 'foo' whose name doesn't contain 'Music' to directory 'bar'. ### Response: find foo -type f ! -name '*Music*' -exec cp {} bar \; |
Copy all files with '.png' (case insensitive) extension under '/home/mine' directory tree to '/home/mine/pngcoppies/' directory with new names constructed by prepending 'copy' in their names | find /home/mine -iname "*.png" -printf "%P\n " | xargs -I % -n1 cp % /home/mine/pngcoppies/copy% | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all files with '.png' (case insensitive) extension under '/home/mine' directory tree to '/home/mine/pngcoppies/' directory with new names constructed by prepending 'copy' in their names ### Response: find /home/mine -iname "*.png" -printf "%P\n " | xargs -I % -n1 cp % /home/mine/pngcoppies/copy% |
Copy all files with '.png' (case insensitive) extension under '/home/mine' directory tree to '/home/mine/pngcoppies/copy.' directory | find /home/mine -iname "*.png" -execdir cp {} /home/mine/pngcoppies/copy{} \; | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all files with '.png' (case insensitive) extension under '/home/mine' directory tree to '/home/mine/pngcoppies/copy.' directory ### Response: find /home/mine -iname "*.png" -execdir cp {} /home/mine/pngcoppies/copy{} \; |
Copy all files with name pattern $j.sh (case insensitive) under '/tmp/2' directory tree to $i directory | find "/tmp/2/" -iname "$j.sh" -exec cp {} "$i" \; | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all files with name pattern $j.sh (case insensitive) under '/tmp/2' directory tree to $i directory ### Response: find "/tmp/2/" -iname "$j.sh" -exec cp {} "$i" \; |
Copy all regular files from the current directory tree to directory `TARGET' | find . -type f -exec cp -t TARGET {} \+ | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all regular files from the current directory tree to directory `TARGET' ### Response: find . -type f -exec cp -t TARGET {} \+ |
Copy all regular files whose names end in "~" from the /path directory tree to ~/backups/ | find /path -type f -name '*~' -print0 | xargs -0 -I % cp -a % ~/backups | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy all regular files whose names end in "~" from the /path directory tree to ~/backups/ ### Response: find /path -type f -name '*~' -print0 | xargs -0 -I % cp -a % ~/backups |
Copy an entire file structure, creating empty files in the copy instead of copying the actual files. | find src/ -type d -exec mkdir -p dest/{} \; -o -type f -exec touch dest/{} \; | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy an entire file structure, creating empty files in the copy instead of copying the actual files. ### Response: find src/ -type d -exec mkdir -p dest/{} \; -o -type f -exec touch dest/{} \; |
Copy and always overwrite all files in "/zzz/zzz" to "/xxx/xxx" | yes | cp -rf /zzz/zzz/* /xxx/xxx | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy and always overwrite all files in "/zzz/zzz" to "/xxx/xxx" ### Response: yes | cp -rf /zzz/zzz/* /xxx/xxx |
Copy directory hierarchy "dir" and all its .txt files to "dir_txt" | find dir/ -name '*.txt' | xargs cp -a --target-directory=dir_txt/ --parents | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy directory hierarchy "dir" and all its .txt files to "dir_txt" ### Response: find dir/ -name '*.txt' | xargs cp -a --target-directory=dir_txt/ --parents |
Copy directory hierarchy from "$sourceDir" to "$targetDir" | find "$sourceDir" -type d | sed -e "s?$sourceDir?$targetDir?" | xargs mkdir -p | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy directory hierarchy from "$sourceDir" to "$targetDir" ### Response: find "$sourceDir" -type d | sed -e "s?$sourceDir?$targetDir?" | xargs mkdir -p |
Copy directory hierarchy from the current working directory to "/path/to/backup/" | find . -type d -exec mkdir -p -- /path/to/backup/{} \; | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy directory hierarchy from the current working directory to "/path/to/backup/" ### Response: find . -type d -exec mkdir -p -- /path/to/backup/{} \; |
Copy directory structure from directory 'olddir' to 'newdir' | find olddir -type d -printf "newdir/%P\0" | xargs -0 mkdir -p | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy directory structure from directory 'olddir' to 'newdir' ### Response: find olddir -type d -printf "newdir/%P\0" | xargs -0 mkdir -p |
Copy directory tree preserving UID and GID and leaving user files alone | find . -depth -print | cpio -o -O /target/directory | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy directory tree preserving UID and GID and leaving user files alone ### Response: find . -depth -print | cpio -o -O /target/directory |
Copy file "exist" from directory "/file/that" to a new file named "file" in "/location/for/new" | cp /file/that/exists /location/for/new/file | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy file "exist" from directory "/file/that" to a new file named "file" in "/location/for/new" ### Response: cp /file/that/exists /location/for/new/file |
Copy file 'src' to 'dest', except if 'dest' already exists. | cp -n src dest | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy file 'src' to 'dest', except if 'dest' already exists. ### Response: cp -n src dest |
Copy file header.shtml to directories dir1, dir2, dir3, and dir4 | find dir1 dir2 dir3 dir4 -type d -exec cp header.shtml {} \; | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy file header.shtml to directories dir1, dir2, dir3, and dir4 ### Response: find dir1 dir2 dir3 dir4 -type d -exec cp header.shtml {} \; |
Copy file in current directory of local host to host "remote", connecting as ssh user matching current local username, and copying the file in home directory on remote host - enable compression during transfer. | scp -C file remote: | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy file in current directory of local host to host "remote", connecting as ssh user matching current local username, and copying the file in home directory on remote host - enable compression during transfer. ### Response: scp -C file remote: |
Copy file linked to by "bar.pdf" to "bar.pdf" | cp --remove-destination `readlink bar.pdf` bar.pdf | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy file linked to by "bar.pdf" to "bar.pdf" ### Response: cp --remove-destination `readlink bar.pdf` bar.pdf |
Copy file linked to by "file" to "file" | cp --remove-destination `readlink file` file | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy file linked to by "file" to "file" ### Response: cp --remove-destination `readlink file` file |
Copy file or directory 'gtest' from directory 'include' in current directory to /usr/include, preserving ownerships and permissions. | sudo cp -a include/gtest /usr/include | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy file or directory 'gtest' from directory 'include' in current directory to /usr/include, preserving ownerships and permissions. ### Response: sudo cp -a include/gtest /usr/include |
Copy file or folder linked to by "file" to "file" | cp -rf --remove-destination `readlink file` file | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy file or folder linked to by "file" to "file" ### Response: cp -rf --remove-destination `readlink file` file |
Copy local file "$1" to host "$2" into host directory "$3" | cat $1 | ssh $2 "mkdir $3;cat >> $3/$1" | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy local file "$1" to host "$2" into host directory "$3" ### Response: cat $1 | ssh $2 "mkdir $3;cat >> $3/$1" |
Copy permissions from "version2/somefile" to "version1/somefile" | chmod --reference version2/somefile version1/somefile | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy permissions from "version2/somefile" to "version1/somefile" ### Response: chmod --reference version2/somefile version1/somefile |
Copy recursively "/source/backup" to "/destination" preserving symbolic links, modification times, and permissions | rsync -rtvpl /source/backup /destination | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy recursively "/source/backup" to "/destination" preserving symbolic links, modification times, and permissions ### Response: rsync -rtvpl /source/backup /destination |
Copy recursively "tata/" to "tata2/" and remove read, write, and execute permission for other | rsync -avz --chmod=o-rwx -p tata/ tata2/ | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy recursively "tata/" to "tata2/" and remove read, write, and execute permission for other ### Response: rsync -avz --chmod=o-rwx -p tata/ tata2/ |
Copy src_dir recursively to dest_dir, but without overwriting existing files. | cp -nr src_dir dest_dir | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy src_dir recursively to dest_dir, but without overwriting existing files. ### Response: cp -nr src_dir dest_dir |
Copy the 3 specified files to /tmp/package, preserving/creating directory structure of each file as specified on command line. | cp --parents src/prog.js images/icon.jpg /tmp/package | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the 3 specified files to /tmp/package, preserving/creating directory structure of each file as specified on command line. ### Response: cp --parents src/prog.js images/icon.jpg /tmp/package |
Copy the current directory tree to "newdirpathname" preserving directory hierarchy | find ./ -depth -print | cpio -pvd newdirpathname | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the current directory tree to "newdirpathname" preserving directory hierarchy ### Response: find ./ -depth -print | cpio -pvd newdirpathname |
Copy the current directory tree to '/path/to/destination/dir' preserving permissions, timestamp and ownership | find . | cpio -pdumv /path/to/destination/dir | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the current directory tree to '/path/to/destination/dir' preserving permissions, timestamp and ownership ### Response: find . | cpio -pdumv /path/to/destination/dir |
Copy the directory hierarchy from "original" to "new" | find original -type d -exec mkdir new/{} \; | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the directory hierarchy from "original" to "new" ### Response: find original -type d -exec mkdir new/{} \; |
Copy the directory hierarchy of the current directory to "destdir" | find . -type d | cpio -pdvm destdir | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the directory hierarchy of the current directory to "destdir" ### Response: find . -type d | cpio -pdvm destdir |
Copy the directory structure in "src/" to "dest/" with empty files | find src/ -type d -exec mkdir -p dest/{} \; -o -type f -exec touch dest/{} \; | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the directory structure in "src/" to "dest/" with empty files ### Response: find src/ -type d -exec mkdir -p dest/{} \; -o -type f -exec touch dest/{} \; |
Copy the entire "/lib" and "/usr" directory including symlinks from "pi@192.168.1.PI" to "$HOME/raspberrypi/rootfs" and delete files after the transfer | rsync -rl --delete-after --safe-links pi@192.168.1.PI:/{lib,usr} $HOME/raspberrypi/rootfs | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the entire "/lib" and "/usr" directory including symlinks from "pi@192.168.1.PI" to "$HOME/raspberrypi/rootfs" and delete files after the transfer ### Response: rsync -rl --delete-after --safe-links pi@192.168.1.PI:/{lib,usr} $HOME/raspberrypi/rootfs |
Copy the entire contents of the current directory preserving ownership, permissions, and times | find . | cpio -pdumv /path/to/destination/dir | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the entire contents of the current directory preserving ownership, permissions, and times ### Response: find . | cpio -pdumv /path/to/destination/dir |
Copy the entire directory tree under t1 to t2, do not create a containing t1 directory in t2. | cp -R t1/ t2 | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the entire directory tree under t1 to t2, do not create a containing t1 directory in t2. ### Response: cp -R t1/ t2 |
Copy the executable "python2.7" in $PATH to "myenv/bin/python" | cp `which python2.7` myenv/bin/python | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the executable "python2.7" in $PATH to "myenv/bin/python" ### Response: cp `which python2.7` myenv/bin/python |
Copy the owner and group from "file.txt" to "$tempfile" | chown --reference=file.txt -- "$tempfile" | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the owner and group from "file.txt" to "$tempfile" ### Response: chown --reference=file.txt -- "$tempfile" |
Copy the owner and group of "oldfile" to "newfile" | chown --reference=oldfile newfile | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the owner and group of "oldfile" to "newfile" ### Response: chown --reference=oldfile newfile |
Copy the standard output of a "bash" session to "/var/log/bash.out.log" | bash | tee /var/log/bash.out.log | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Copy the standard output of a "bash" session to "/var/log/bash.out.log" ### Response: bash | tee /var/log/bash.out.log |
Correct permissions for directories in the web directory | find /your/webdir/ -type d -print0 | xargs -0 chmod 755 | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Correct permissions for directories in the web directory ### Response: find /your/webdir/ -type d -print0 | xargs -0 chmod 755 |
Correct permissions for files in the web directory | find /your/webdir -type f | xargs chmod 644 | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Correct permissions for files in the web directory ### Response: find /your/webdir -type f | xargs chmod 644 |
Count all directories in maximum 1 level down the current directory | find . -maxdepth 1 -type d -exec ls -dlrt {} \; | wc --lines | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count all directories in maximum 1 level down the current directory ### Response: find . -maxdepth 1 -type d -exec ls -dlrt {} \; | wc --lines |
Count all directories under current directory | find . -type d -exec ls -dlrt {} \; | wc --lines | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count all directories under current directory ### Response: find . -type d -exec ls -dlrt {} \; | wc --lines |
Count all files under "/DIR" | find /DIR -type f -print0 | tr -dc '\0' | wc -c | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count all files under "/DIR" ### Response: find /DIR -type f -print0 | tr -dc '\0' | wc -c |
Count all the lines of all '*.c' files in current directory recursively | find . -name "*.c" -print0 | xargs -0 cat | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count all the lines of all '*.c' files in current directory recursively ### Response: find . -name "*.c" -print0 | xargs -0 cat | wc -l |
Count all the lines of all files with names ending with 'php' in current directory recursively | find -name '*php' | xargs cat | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count all the lines of all files with names ending with 'php' in current directory recursively ### Response: find -name '*php' | xargs cat | wc -l |
Count all the lines of all php files in current directory recursively | find -name '*.php' | xargs cat | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count all the lines of all php files in current directory recursively ### Response: find -name '*.php' | xargs cat | wc -l |
Count all the lines of code in all php files in current directory recursively | find . -name "*.php" | xargs grep -v -c '^$' | awk 'BEGIN {FS=":"} { $cnt = $cnt + $2} END {print $cnt}' | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count all the lines of code in all php files in current directory recursively ### Response: find . -name "*.php" | xargs grep -v -c '^$' | awk 'BEGIN {FS=":"} { $cnt = $cnt + $2} END {print $cnt}' |
Count all the mp3 files in the music user's home and subdirs. | find ~music -type f -iname *.mp3 | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count all the mp3 files in the music user's home and subdirs. ### Response: find ~music -type f -iname *.mp3 | wc -l |
Count and show the number of lines for each PHP files in the current directory tree | find . -name '*.php' | xargs wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count and show the number of lines for each PHP files in the current directory tree ### Response: find . -name '*.php' | xargs wc -l |
Count files accessed more than a month ago | find . -atime +30 -exec ls \; | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count files accessed more than a month ago ### Response: find . -atime +30 -exec ls \; | wc -l |
Count files in $DIR_TO_CLEAN that are older than $DAYS_TO_SAVE days | find "$DIR_TO_CLEAN" -mtime +$DAYS_TO_SAVE | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count files in $DIR_TO_CLEAN that are older than $DAYS_TO_SAVE days ### Response: find "$DIR_TO_CLEAN" -mtime +$DAYS_TO_SAVE | wc -l |
Count files in the current path by modification month | find . -maxdepth 1 -type f -printf '%TY-%Tm\n' | sort | uniq -c | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count files in the current path by modification month ### Response: find . -maxdepth 1 -type f -printf '%TY-%Tm\n' | sort | uniq -c |
Count line numbers on files and record each count along with individual file name. | find /home/my_dir -name '*.txt' | xargs grep -c ^.* | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count line numbers on files and record each count along with individual file name. ### Response: find /home/my_dir -name '*.txt' | xargs grep -c ^.* |
Count lines that are neither blanks nor comments in a file 'foo.pl' | cat foo.pl | sed '/^\s*#/d;/^\s*$/d' | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count lines that are neither blanks nor comments in a file 'foo.pl' ### Response: cat foo.pl | sed '/^\s*#/d;/^\s*$/d' | wc -l |
Count md5sum of all '*.py' files in a current folder with subfolders. | find /path/to/dir/ -type f -name "*.py" -exec md5sum {} + | awk '{print $1}' | sort | md5sum | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count md5sum of all '*.py' files in a current folder with subfolders. ### Response: find /path/to/dir/ -type f -name "*.py" -exec md5sum {} + | awk '{print $1}' | sort | md5sum |
Count non-blank lines in a file 'foo.c' | cat foo.c | sed '/^\s*$/d' | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count non-blank lines in a file 'foo.c' ### Response: cat foo.c | sed '/^\s*$/d' | wc -l |
Count non-blank lines in a file 'foo.c' | sed '/^\s*$/d' foo.c | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count non-blank lines in a file 'foo.c' ### Response: sed '/^\s*$/d' foo.c | wc -l |
Count number of A records of domain '$domain' on nameserver '$server' and save value in 'result' variable | result="$(dig +short @"$server" "$domain" | wc -l)" | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count number of A records of domain '$domain' on nameserver '$server' and save value in 'result' variable ### Response: result="$(dig +short @"$server" "$domain" | wc -l)" |
Count number of lines in "Sample_51770BL1_R1.fastq.gz" | zcat Sample_51770BL1_R1.fastq.gz | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count number of lines in "Sample_51770BL1_R1.fastq.gz" ### Response: zcat Sample_51770BL1_R1.fastq.gz | wc -l |
Count number of lines in all files matching "*R1*.fastq.gz" | zcat *R1*.fastq.gz | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count number of lines in all files matching "*R1*.fastq.gz" ### Response: zcat *R1*.fastq.gz | wc -l |
Count number of occurences of "123" in the string "123 123 123" (ie. 3) | echo "123 123 123" | grep -o 123 | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count number of occurences of "123" in the string "123 123 123" (ie. 3) ### Response: echo "123 123 123" | grep -o 123 | wc -l |
Count number of users logged in | who | awk -F' ' '{print $1}' | sort -u | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count number of users logged in ### Response: who | awk -F' ' '{print $1}' | sort -u | wc -l |
Count the *.html files residing in the /usr/src directory tree and containing string "foo" | find /usr/src -name "*.html" -exec grep -l foo '{}' ';' | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the *.html files residing in the /usr/src directory tree and containing string "foo" ### Response: find /usr/src -name "*.html" -exec grep -l foo '{}' ';' | wc -l |
Count the *.html files residing in the /usr/src directory tree and containing string "foo" | find /usr/src -name "*.html" | xargs grep -l foo | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the *.html files residing in the /usr/src directory tree and containing string "foo" ### Response: find /usr/src -name "*.html" | xargs grep -l foo | wc -l |
Count the number of "x" characters in "filename" | sed 's/[^x]//g' filename | tr -d '\012' | wc -c | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of "x" characters in "filename" ### Response: sed 's/[^x]//g' filename | tr -d '\012' | wc -c |
Count the number of .gz files in directory tree /home/user1/data1/2012/mainDir | find /home/user1/data1/2012/mainDir -name '*.gz' | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of .gz files in directory tree /home/user1/data1/2012/mainDir ### Response: find /home/user1/data1/2012/mainDir -name '*.gz' | wc -l |
Count the number of .gz files in the current directory tree | find -name "*.gz" | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of .gz files in the current directory tree ### Response: find -name "*.gz" | wc -l |
Count the number of .java files in all folders rooted in the current folder | find . -name "*.java" | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of .java files in all folders rooted in the current folder ### Response: find . -name "*.java" | wc -l |
Count the number of all directories under current directory non-recursively | find . -mindepth 1 -maxdepth 1 -type d | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of all directories under current directory non-recursively ### Response: find . -mindepth 1 -maxdepth 1 -type d | wc -l |
Count the number of all directories under directory '/mount/point' non-recursively | find /mount/point -maxdepth 1 -type d | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of all directories under directory '/mount/point' non-recursively ### Response: find /mount/point -maxdepth 1 -type d | wc -l |
Count the number of areas that differ in "file1" and "file2" with 0 lines of unified context | diff -U 0 file1 file2 | grep ^@ | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of areas that differ in "file1" and "file2" with 0 lines of unified context ### Response: diff -U 0 file1 file2 | grep ^@ | wc -l |
Count the number of characters in the list of regular files from the current directory tree | find . -type f | xargs | wc -c | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of characters in the list of regular files from the current directory tree ### Response: find . -type f | xargs | wc -c |
Count the number of differing lines in "file1" and "file2" | diff file1 file2 | grep ^[\>\<] | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of differing lines in "file1" and "file2" ### Response: diff file1 file2 | grep ^[\>\<] | wc -l |
Count the number of differing lines in "file1" and "file2" with 0 lines of unified context | diff -U 0 file1 file2 | grep -v ^@ | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of differing lines in "file1" and "file2" with 0 lines of unified context ### Response: diff -U 0 file1 file2 | grep -v ^@ | wc -l |
Count the number of directories in the current directory and below | find . -type f -exec basename {} \; | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of directories in the current directory and below ### Response: find . -type f -exec basename {} \; | wc -l |
Count the number of directories under directory '/directory/' non-recursively | find /directory/ -maxdepth 1 -type d -print| wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of directories under directory '/directory/' non-recursively ### Response: find /directory/ -maxdepth 1 -type d -print| wc -l |
Count the number of equal lines in "file1.txt" and "file2.txt" | comm -12 <(sort file1.txt) <(sort file2.txt) | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of equal lines in "file1.txt" and "file2.txt" ### Response: comm -12 <(sort file1.txt) <(sort file2.txt) | wc -l |
Count the number of equal lines in sorted files "ignore.txt" and "input.txt" | comm -12 ignore.txt input.txt | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of equal lines in sorted files "ignore.txt" and "input.txt" ### Response: comm -12 ignore.txt input.txt | wc -l |
Count the number of files in the /usr/ports directory tree whose names begin with 'pkg-plist' and which contain 'dirrmtry' | find /usr/ports/ -name pkg-plist\* -exec grep dirrmtry '{}' '+' | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files in the /usr/ports directory tree whose names begin with 'pkg-plist' and which contain 'dirrmtry' ### Response: find /usr/ports/ -name pkg-plist\* -exec grep dirrmtry '{}' '+' | wc -l |
Count the number of files in the /usr/ports directory tree whose names begin with 'pkg-plist' and which contain 'etc/rc.d/' | find /usr/ports/ -name pkg-plist\* -exec grep -l etc/rc.d/ '{}' '+' | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files in the /usr/ports directory tree whose names begin with 'pkg-plist' and which contain 'etc/rc.d/' ### Response: find /usr/ports/ -name pkg-plist\* -exec grep -l etc/rc.d/ '{}' '+' | wc -l |
Count the number of files in the /usr/ports directory tree whose names begin with 'pkg-plist' and which contain 'unexec.rmdir%D' | find /usr/ports/ -name pkg-plist\* -exec grep 'unexec.rmdir %D' '{}' '+' | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files in the /usr/ports directory tree whose names begin with 'pkg-plist' and which contain 'unexec.rmdir%D' ### Response: find /usr/ports/ -name pkg-plist\* -exec grep 'unexec.rmdir %D' '{}' '+' | wc -l |
Count the number of files in the current directory and below | find . -type d -exec basename {} \; | wc –l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files in the current directory and below ### Response: find . -type d -exec basename {} \; | wc –l |
Count the number of files in the directory trees whose pathnames match pattern '/dev/sd*[a-z]' | find /dev/sd*[a-z] -printf . | wc -c | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files in the directory trees whose pathnames match pattern '/dev/sd*[a-z]' ### Response: find /dev/sd*[a-z] -printf . | wc -c |
Count the number of files in the directory trees whose pathnames match pattern '/dev/sd*[a-z]' | find /dev/sd*[a-z] | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files in the directory trees whose pathnames match pattern '/dev/sd*[a-z]' ### Response: find /dev/sd*[a-z] | wc -l |
Count the number of files named 'job.history' under '/data/SpoolIn' directory tree that match 'FAIL' in their contents | find /data/SpoolIn -name job.history -exec grep -l FAIL {} \+ | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files named 'job.history' under '/data/SpoolIn' directory tree that match 'FAIL' in their contents ### Response: find /data/SpoolIn -name job.history -exec grep -l FAIL {} \+ | wc -l |
Count the number of files named 'job.history' under '/data/SpoolIn' directory tree that match 'FAIL' in their contents | find /data/SpoolIn -name job.history -exec grep -l FAIL {} \; | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files named 'job.history' under '/data/SpoolIn' directory tree that match 'FAIL' in their contents ### Response: find /data/SpoolIn -name job.history -exec grep -l FAIL {} \; | wc -l |
Count the number of files named 'job.history' under '/data/SpoolIn' directory tree that match 'FAIL' in their contents | find /data/SpoolIn -name job.history | xargs grep -l FAIL | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files named 'job.history' under '/data/SpoolIn' directory tree that match 'FAIL' in their contents ### Response: find /data/SpoolIn -name job.history | xargs grep -l FAIL | wc -l |
Count the number of files named `file1' | find -name file1 | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files named `file1' ### Response: find -name file1 | wc -l |
Count the number of files/directories named file1 under current directory | find -name file1 | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files/directories named file1 under current directory ### Response: find -name file1 | wc -l |
Count the number of files/directories with '.php' extension under current directory tree and change the permissions to 755 | find . -name "*.php" -exec chmod 755 {} \; -exec /bin/echo {} \; | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of files/directories with '.php' extension under current directory tree and change the permissions to 755 ### Response: find . -name "*.php" -exec chmod 755 {} \; -exec /bin/echo {} \; | wc -l |
Count the number of lines in "/dir/file.txt" | cat /dir/file.txt | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of lines in "/dir/file.txt" ### Response: cat /dir/file.txt | wc -l |
Count the number of lines in "/etc/fstab" | cat /etc/fstab | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of lines in "/etc/fstab" ### Response: cat /etc/fstab | wc -l |
Count the number of lines in "myfile.txt" | cat myfile.txt | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of lines in "myfile.txt" ### Response: cat myfile.txt | wc -l |
Count the number of lines in "testfile" wrapped to fit in a width of "$COLUMNS" characters | fold -w "$COLUMNS" testfile | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of lines in "testfile" wrapped to fit in a width of "$COLUMNS" characters ### Response: fold -w "$COLUMNS" testfile | wc -l |
Count the number of lines in all ".php" files in the current directory tree | find . -name '*.php' -type f | xargs cat | wc -l | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of lines in all ".php" files in the current directory tree ### Response: find . -name '*.php' -type f | xargs cat | wc -l |
Count the number of lines in all ".php" files in the current directory tree | wc -l `tree -if --noreport | grep -e'\.php$'` | Below is an instruction that describes a task. Write a response that appropriately completes the request. ### Instruction: Count the number of lines in all ".php" files in the current directory tree ### Response: wc -l `tree -if --noreport | grep -e'\.php$'` |