InterCode-Complete / train_fs_3.csv
westenfelder's picture
Upload 5 files
e9f3646 verified
raw
history blame contribute delete
No virus
8.25 kB
query,gold
find files in /workspace directory which are modified 30 days ago,find /workspace -daystart -type f -mtime -30
find files in the /workspace directory with pattern` *.c that larger than 1 Kilobytes,find /workspace -name '*.c' -size +1k -print
"find files in the /workspace directory and sub-directories, that changed within last hour",find /workspace -cmin -60
"find files in the /workspace directory and sub-directories, that were accessed within last hour",find /workspace -amin -60
list all the drectories present in the /workspace directory and do not search in the sub directories.,find /workspace -maxdepth 1 -type d
list all the files in the /workspace directory which are of size 0 bytes.,find /workspace -empty
list all zero-length files under the /workspace directory,find /workspace -empty -exec ls {} \;
locate and remove large files (> 1 KB) in /workspace,find /workspace -type f -size +1k -delete
long list al the files in the /workspace directory which have only read permission to the group,find /workspace -perm 400 -type f -exec ls -l {} \;
long list al the files in the /workspace directory which have all the permissions,find /workspace -perm 777 -type f -exec ls -l {} \;
long list the details of all the shell scripts in /workspace directory,"find /workspace -name ""*.sh"" -exec ls -ld {} \;"
move all files in the /workspace folder to / and do not move the files in the sub folder,find /workspace -maxdepth 1 -type f -exec mv -t / {} +
move files in /workspace accessed more than one day ago to directory /,find /workspace -atime +1 -type f -exec mv {} / \;
"print all filenames of files under /workspace/dir1 dir containing 'hello', case-insensitive",find /workspace/dir1 -type f -exec grep -il 'hello' {} \;
print disk usage of files or folders in /workspace,du -sh /workspace
print the last word in /workspace/dir1/long.txt,tac /workspace/dir1/long.txt | awk 'NF{print $NF; exit}'
print top 3 largest files and /workspace,du -a /workspace | sort -nr | head -3
"prints first line of ""/workspace/dir1/long.txt""",head -n1 /workspace/dir1/long.txt
"prints the last non-empty line of ""/workspace/dir1/a.txt""",tac /workspace/dir1/a.txt | grep -m 1 '.'
prune all the files in the /workspace directory,find /workspace -prune
search for all the files in the /workspace directory which have size greater than 1KB (approx) and less than 32KB(approx).,find /workspace -size +1000c -size -32000c -print
search for all the files in the /workspace folder and sort them in the order of their depth and display the file names,find /workspace -type d -printf '%d\t%P\n' | sort -r -nk1 | cut -f2-
search for all the files in the /workspace folder which are bigger than 1KB and display them biggest file,find /workspace -size +1k -exec ls -ls {} \+ | sort -n | tail -1
search for text files in the /workspace folder which do not have write access to others,"find /workspace -type f \( -iname ""*.txt"" -not -perm -o=w \)"
"search for the directory ""mysql"" in the entire file system",find /workspace -name mysql -type d
Print a list of all duplicate case insensitive filenames in the /workspace directory tree,find /workspace -type f | awk -F/ '{print $NF}' | sort -f | uniq -i -d
search for the file foo in the /workspace folder and display a long listing of it in sorted order of modification date,find /workspace -name foo | xargs ls -tl
"search for the word ""hello"" in all the regular/normal files in the /workspace folder and display the matched file name","find /workspace -type f | xargs grep -l ""hello"""
Calculate the md5 sum of all files in the /workspace directory with the filename printed first,"ls -p | grep -v /workspace | xargs md5sum | awk '{print $2,$1}'"
"Calculate the md5 sum of the contents of all files sorted in directory tree ""/workspace""",find /workspace -type f | sort -u | xargs cat | md5sum
Change directory to the alphabetically last path under the /workspace directory,cd $(find /workspace -type d -print0 | sort -z | tr '\0' '\n' | tail -1)
Count the number of unique 3 to 6 character file extensions are in the /workspace directory tree,"find /workspace -type f -name ""*.*"" | grep -o -E ""\.[^\.]+$"" | grep -o -E ""[[:alpha:]]{3,6}"" | awk '{print tolower($0)}' | sort | uniq -c | sort -rn"
"Create a copy of the /workspace directory structure in the /usr directory,",find /workspace -type d -print|sed 's@^@/usr/@'|xargs mkdir -p
Display a long listing of the oldest file under '/workspace' directory tree,"find /workspace -printf ""%T@ %p\n"" | sort -n | head -1 | cut -d"" "" -f2- | xargs ls -al"
Find the largest 2 directories under /workspace directory,find /workspace -type d -print0 | xargs -0 du | sort -n | tail -2 | cut -f2 | xargs -I{} du -sh {}
List all files with their paths that have identical content in /workspace directory,find /workspace -type f | xargs md5sum | sort | uniq -Dw32
"Make directories for each unique file path in ""/workspace/files.txt""","cat /workspace/files.txt |xargs -I {} dirname ""{}""| sort -u | xargs -I{} mkdir -p ""{}"""
"Print the total disk usage in bytes of all files listed in ""/workspace/files.txt""",cat /workspace/files.txt | xargs du -c | tail -1 | awk '{print $1}'
Unhide all hidden files in the /workspace directory,"find /workspace -maxdepth 1 -type f -name '.*' -exec sh -c 'mv ""$0"" ""${0%/\.*}/${0##*/.}""' {} \;"
"Count the number of differing lines in ""/workspace/dir1/long.txt"" and ""/workspace/dir1/terminate.txt""",diff /workspace/dir1/long.txt /workspace/dir1/terminate.txt | grep ^[\>\<] | wc -l
"Count the number of differing lines in ""/workspace/dir1/terminate.txt"" and ""/workspace/dir1/long.txt"" with 0 lines of unified context",diff -U 0 /workspace/dir1/terminate.txt /workspace/dir1/long.txt | grep -v ^@ | wc -l
Counts lines in file /workspace/dir1/a.txt ignoring empty lines and lines with spaces only.,awk '!/^[[:space:]]*$/{++x} END{print x}' /workspace/dir1/a.txt
"Create a symbolic link in directory ""~/newlinks"" for each file listed in ""/workspace/results.txt""",cat /workspace/results.txt | xargs -I{} ln -s {} ~/newlinks
Delete all hidden files under /workspace,find /workspace -type f -name '.*' -delete
Determine if /workspace/dir2/mysql/ exists on a mounted file system.,df /workspace/dir2/mysql/
"Display a dump of ""/workspace/dir1/long.txt"" as floating point values of double size",od -t fD /workspace/dir1/long.txt
Display differences between list of files in /workspace/dir1 and /workspace/dir2.,diff <(ls /workspace/dir1) <(ls /workspace/dir2)
Display the file size of file '/workspace/dir1/sum.c' in bytes,du -sb /workspace/dir1/sum.c | cut -f1
Display the last slash-separated part of each filename path in /workspace/dir1/file.txt,rev /workspace/dir1/file.txt | cut -d/ -f1 | rev
Display the sizes and filepaths of all files/directories in /workspace directory sorted in descending order of size,du /workspace -a -h --max-depth=1 | sort -hr
Print percentage of the space used on the /workspace directory.,df -k /workspace | tail -1 | awk '{print $5}'
"Print the contents of ""/workspace/dir1/long.txt"" in reverse order",nl /workspace/dir1/long.txt | sort -nr | cut -b8-
"Create an empty file ""Icon"" with a carriage return character in the end of its name.",echo $'Icon\r' | xargs touch
Create a symbolc link in the /workspace/dir1 to root folder,ln /workspace/dir1 -s /
"Display permissions, user, group, and full path for each file in the /workspace directory tree",tree /workspace -p -u -g -f
Search for 'hello' case insensitively in all files under /workspace directory tree and show the matched lines with their filenames,"find /workspace -type f -print0 | xargs -0 grep -iH ""hello"""
"Split the output of ""/workspace/archive.tar.gz"" into files of at most 10 MiB in size and use prefix ""output_prefix""",tar -xf /workspace/archive.tar.gz | split -b 10M -d - /output_prefix
Unpack all *.gz archives in the /workspace directory tree,find /workspace -name '*.gz' -print0 | xargs -0 gunzip
"Uncompress ""/workspace/archive.tar.gz"" and extract the archive to ""/backup""",gzip -dc /workspace/archive.tar.gz | tar -xf - -C /backup
"Create a symbolic link to ""/workspace/dir1/terminate.txt"" named ""/workspace/test""",ln /workspace/dir1/terminate.txt /workspace/test