-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathmanual.evaluations.author
112 lines (112 loc) · 22.4 KB
/
manual.evaluations.author
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
description,prediction,template,correct template,correct command
"Find all files in your home directory and below that are exactly 100M.","find ~ -size 100m","find Path -size Size","y","y"
"Display the output of ""ls"" for an 80 character wide display","ls -b","ls -b","n","n"
"Display the output of ""ls"" for an 80 character wide display","cat ls | od -c","cat File | od -c","n","n"
"Display the output of ""ls"" for an 80 character wide display","od -c ls","od -c File","n","n"
"Find all Subscription.java files/directories under current directory and enter into the parent directory of the first one found","cd $(find . -name 'Subscription.java' | xargs -I {} dirname {})","cd $( find Path -name Regex | xargs -I {} dirname {} )","y","y"
"Answer ""n"" to any prompts in the interactive recursive removal of ""dir1"", ""dir2"", and ""dir3""","echo dir1 dir2 | grep -v ""dir3"" | xargs -I {} rm -r -f {}","echo Regex Regex | grep -v Regex | xargs -I {} rm -r -f {}","n","n"
"Delete all *.zip files under current directory that are older than 2 days","find . -type f -name ""*.zip"" -mtime +2 -delete","find Path -type f -name Regex -mtime +Timespan -delete","y","y"
"Execute all commands in ""commands-to-execute-remotely.sh"" on server ""blah_server""","ssh -i commands-to-execute-remotely.sh blah_server","ssh -i File Regex","n","n"
"Execute all commands in ""commands-to-execute-remotely.sh"" on server ""blah_server""","chmod +x commands-to-execute-remotely.sh blah_server","chmod +Permission File File","n","n"
"find all files in the current folder which have not been accessed in the last 30 days in the current folder","find . -name '???????????????????????????????????????????????????'","find Path -name Regex","n","n"
"find all files in the current folder which have not been accessed in the last 30 days in the current folder","find . -name '??????????????????????????????????????????????????'","find Path -name Regex","n","n"
"search for files in current folder using name patterns","find . -iregex '.*\.[__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK]*'","find Path -iregex Regex","y","n"
"search for files in current folder using name patterns","find . -iregex '.*\.[__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK]*'","find Path -iregex Regex","y","n"
"Copy all files in ""/mail"" to ""/home/username"" preserving the directory hierarchy and modification times","find /mail -type f -exec cp {} /home/username/ {} \;","find Path -type f -exec cp {} File {} \;","n","n"
"Copy all files in ""/mail"" to ""/home/username"" preserving the directory hierarchy and modification times","find /mail | cpio -p -d -u -m /home/username/","find Path | cpio -p -d -u -m Regex","y","y"
"Calculate the md5 sum of all files in ""/your/dir"" including content and filenames","cat /your/dir | md5sum | xargs -I {} md5sum {}","cat File | md5sum | xargs -I {} md5sum {}","n","n"
"Lists content of all subfolder (without recursion) in a current folder.","ls","ls","n","n"
"Find all the .c files in the current directory tree that contain the string ‘stdlib.h’","find . -name '*.c' -exec grep -H 'stdlib.h' {} \;","find Path -name Regex -exec grep -H Regex {} \;","y","y"
"Print the last line of the alphabetically sorted lines in file ""set""","sort set | uniq | sort -k 1n | cut -d ' ' -f 2","sort File | uniq | sort -k Number | cut -d Regex -f Number","n","n"
"Find all regular files under $FILES_PATH directory tree and save the output to 'FILES' variable","find $FILES_PATH -type f -print0 | xargs -0 -L 1 -I {} wc -l {}","find Path -type f -print0 | xargs -0 -L Quantity -I {} wc -l {}","n","n"
"Find all regular files under $FILES_PATH directory tree and save the output to 'FILES' variable","find $FILES_PATH -type f -print0 | xargs -0 -I {} wc -l {}","find Path -type f -print0 | xargs -0 -I {} wc -l {}","n","n"
"Find all regular files under $FILES_PATH directory tree and save the output to 'FILES' variable","find ""$FILES_PATH"" -type f -print0 | xargs -0 -L 1 -I {} wc -l {}","find Path -type f -print0 | xargs -0 -L Quantity -I {} wc -l {}","n","n"
"force delete all the files that have been modified in the last 3 days","find ./ -mtime -3 -exec rm -f {} \;","find Path -mtime -Timespan -exec rm -f {} \;","y","y"
"Search for 'magic' in all regular files under current directory tree","find . -type f -print0 | xargs -0 -I {} grep -F 'magic' {}","find Path -type f -print0 | xargs -0 -I {} grep -F Regex {}","y","y"
"Rename ""file.txt"" in directories ""v_1"", ""v_2"", and ""v_3"" each to ""v_1.txt"", ""v_2.txt"", and ""v_3.txt"" respectively and print the conversion","paste v_1.txt v_3.txt v_3.txt","paste File File File","n","n"
"Rename ""file.txt"" in directories ""v_1"", ""v_2"", and ""v_3"" each to ""v_1.txt"", ""v_2.txt"", and ""v_3.txt"" respectively and print the conversion","paste v_1.txt v_3.txt v_2.txt v_3.txt","paste File File File File","n","n"
"Rename ""file.txt"" in directories ""v_1"", ""v_2"", and ""v_3"" each to ""v_1.txt"", ""v_2.txt"", and ""v_3.txt"" respectively and print the conversion","diff v_1.txt v_3.txt v_3.txt","diff File File File","n","n"
"Find files under /usr that are newer than the first file `FirstFile'","find /usr -newer firstfirst","find Path -newer File","y","n"
"Print the base name of the current working directory","pwd | cut -d "" "" -f 1 | tr '\n' '\n'","pwd | cut -d Regex -f Number | tr Regex Regex","n","n"
"Replace each non-blank line in ""YOURFILE"" preceded with ""pX="" where ""X"" is the line number","nl -v X YOURFILE YOURFILE pX=","nl -v Quantity File File File","n","n"
"Replace each non-blank line in ""YOURFILE"" preceded with ""pX="" where ""X"" is the line number","
","","n","n"
"Find files/directories named 'sar' under directory trees whose path starts with '/u' or '/b' or '/s' or '/o'","find /u /u /b -path ""/u"" -exec grep -q 'sar' {} \; -print","find Path Path Path -path Regex -exec grep -q Regex {} \; -print","n","n"
"Search the current directory tree for regular files modified within the past 24 hours whose names do not end with "".DS_Store""","find . -type f -not -name '*.DS_Store' -mtime 0","find Path -type f -not -name Regex -mtime Timespan","y","y"
"Search the current directory tree for regular files modified within the past 24 hours whose names do not end with "".DS_Store""","find . -type f -not -name ""*.DS_Store"" -print","find Path -type f -not -name Regex -print","n","n"
"Find *.c files under $HOME and search for the string 'sprintf' in those files","find $HOME -name '*.c' -print0 | xargs -0 -I {} grep -H -n 'sprintf' {}","find Path -name Regex -print0 | xargs -0 -I {} grep -H -n Regex {}","y","y"
"Find *.c files under $HOME and search for the string 'sprintf' in those files","find $HOME -name '*.c' -exec grep -H 'sprintf' {} \;","find Path -name Regex -exec grep -H Regex {} \;","y","y"
"Find *.c files under $HOME and search for the string 'sprintf' in those files","find $HOME -name '*.c' -exec grep -H -n 'sprintf' {} \;","find Path -name Regex -exec grep -H -n Regex {} \;","y","y"
"(Linux-specific) Display all lines containing UTRACE in the current kernel's compile-time config file.","cat *.UTRACE | grep -i UTRACE | cut -d ' ' -f 1 | xargs -I {} grep 'UTRACE-time' {}","cat File | grep -i Regex | cut -d Regex -f Number | xargs -I {} grep Regex {}","n","n"
"Find all files on the system that are world writable","find / -perm -u+s -print","find Path -perm -Permission -print","y","n"
"search for the file "".user.log"" in a folder","find ./ -name "".user.log""","find Path -name Regex","y","y"
"search for the file "".user.log"" in a folder","find /home/user.log -name .user.log","find Path -name Regex","y","y"
"display a long listing of all the files in the current folder which have been modified in the last 24 hours","find . -mtime -1 -exec ls {} \;","find Path -mtime -Timespan -exec ls {} \;","y","y"
"Find the largest 10 directories under current directory","find . -type d -exec du -h -h {} + | sort -r -h | head -n 10","find Path -type d -exec du -h -h {} + | sort -r -h | head -n Quantity","y","y"
"Remove the passphrase from ~/.ssh/id_rsa.","find ~/.ssh/id_rsa -type d -exec rm {} \;","find Path -type d -exec rm {} \;","n","n"
"search for a file ""file"" in current folder and if the file is found quit !","find . -path '*/[__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK]*'","find Path -path Regex","n","n"
"search for a file ""file"" in current folder and if the file is found quit !","find . -path '*/[__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK][__SP__UNK]*'","find Path -path Regex","n","n"
"Remove `core' files whose status was changed more than 4 days ago","find . -name ""core"" -ctime +4 -exec rm -f {} \;","find Path -name Regex -ctime +Timespan -exec rm -f {} \;","y","y"
"Find ""*.dat"" files recursively in the current directory, print the lines starting on line 5 to the console and save to ""concat.txt""","tail -n +5 *.dat","tail -n +Quantity File","n","n"
"Prints path to folder that contains target of the symbolic link ../../../../etc/passwd.","dirname $(readlink -f ../../../etc/etc/passwd)","dirname $( readlink -f File )","y","n"
"Prints path to folder that contains target of the symbolic link ../../../../etc/passwd.","dirname $(readlink -f ../../../../etc/etc/passwd)","dirname $( readlink -f File )","y","y"
"Prints path to folder that contains target of the symbolic link ../../../../etc/passwd.","dirname $(readlink -f ../../../../../etc/etc/passwd)","dirname $( readlink -f File )","y","n"
"remove all the core files from /usr folder which have not been accessed in the last 7*24 hours","find /usr -name core -type f -atime +7 -exec rm {} \;","find Path -name Regex -type f -atime +Timespan -exec rm {} \;","y","y"
"Search for the string 'git' in all the files under current directory tree without traversing into '.git' folder and excluding files that have 'git' in their names","find . -type f -not -name '*.git' | xargs -I {} grep git {}","find Path -type f -not -name Regex | xargs -I {} grep Regex {}","n","n"
"Search for the string 'git' in all the files under current directory tree without traversing into '.git' folder and excluding files that have 'git' in their names","find . -type f -not -name '*.git' | xargs -I {} grep -E git {}","find Path -type f -not -name Regex | xargs -I {} grep -E Regex {}","n","n"
"Search for the string 'git' in all the files under current directory tree without traversing into '.git' folder and excluding files that have 'git' in their names","find . -not -path '*.git*' -not -name '*.git' | xargs -I {} grep git {}","find Path -not -path Regex -not -name Regex | xargs -I {} grep Regex {}","y","n"
"Split the contents of ""file1 file2 ... file40000"" into 1445 files in a round robin fashion with prefix ""outputprefix"" and numeric suffixes","cat file1 .. | xargs -n 1 -I {} split -l outputprefix {}","cat File File | xargs -n Quantity -I {} split -l Quantity {}","n","n"
"Split the contents of ""file1 file2 ... file40000"" into 1445 files in a round robin fashion with prefix ""outputprefix"" and numeric suffixes","cat file1 .. | split --lines=outputprefix --numeric-suffixes --suffix-length=2 into2 ..","cat File File | split --lines Quantity --numeric-suffixes --suffix-length Quantity File Regex","n","n"
"Split the contents of ""file1 file2 ... file40000"" into 1445 files in a round robin fashion with prefix ""outputprefix"" and numeric suffixes","cat file1 .. | xargs -n 1 -I {} cat {}","cat File File | xargs -n Quantity -I {} cat {}","n","n"
"Search the current directory tree for files and directories with permissions 775","find . -exec chmod 775 {} \;","find Path -exec chmod Permission {} \;","n","n"
"Find files/directories writable by group and others under the /path directory","find /path -perm /g+w,g+w,o+w","find Path -perm Permission","y","n"
"Find files/directories writable by group and others under the /path directory","find /path -perm /g=w,o+w","find Path -perm Permission","y","n"
"Find ""file.xml"" under the current directory and change directory to its parent","cd $(find . -iname file.xml)","cd $( find Path -iname Regex )","n","n"
"Read a line from standard input into variable ""message"" with the prompt ""Please Enter a Message: $cr""","read -p ""Please Enter a Message $cr $cr"" message","read -p Regex Regex","y","n"
"Read a line from standard input into variable ""message"" with the prompt ""Please Enter a Message: $cr""","read -p ""Please Enter a Message $cr $cr $cr"" message","read -p Regex Regex","y","n"
"Perform a white space safe search for all files/directories under current directory","find . -mindepth 1 -print0 | xargs -0 -I {} rm {}","find Path -mindepth Quantity -print0 | xargs -0 -I {} rm {}","n","n"
"find all the wav files in the current folder and do not search in the sub directories","find . -maxdepth 1 -type f -name '*.wav'","find Path -maxdepth Quantity -type f -name Regex","y","y"
"Find all .js files in the $d directory tree whose pathnames do not contain whitespaces","find ""$d"" -name ""*.js"" | xargs -I {} grep -l whitespaces {}","find Path -name Regex | xargs -I {} grep -l Regex {}","n","n"
"Find all .js files in the $d directory tree whose pathnames do not contain whitespaces","find ""$d"" -name ""*.js"" | grep -v ""$d""","find Path -name Regex | grep -v Regex","y","n"
"Search the regular files of the current directory tree for string ""whatever""","find . -type f -exec grep -H -n ""whatever"" {} \;","find Path -type f -exec grep -H -n Regex {} \;","y","y"
"Search the regular files of the current directory tree for string ""whatever""","find . -type f -exec grep -H 'whatever' {} \;","find Path -type f -exec grep -H Regex {} \;","y","y"
"Find the directories whose names contain ""New Parts"" at level 3 of the current directory tree and create symlinks to them in /cygdrive/c/Views","find . -mindepth 3 -maxdepth 3 -type d -iname ""*New Parts"" -exec ln -s {} /cygdrive/c/Views \;","find Path -mindepth Quantity -maxdepth Quantity -type d -iname Regex -exec ln -s {} Regex \;","n","n"
"Find the directories whose names contain ""New Parts"" at level 3 of the current directory tree and create symlinks to them in /cygdrive/c/Views","find . -mindepth 3 -maxdepth 3 -type d -name '*New Parts' -exec ln -s {} /cygdrive/c/Views \;","find Path -mindepth Quantity -maxdepth Quantity -type d -name Regex -exec ln -s {} Regex \;","y","n"
"Find the directories whose names contain ""New Parts"" at level 3 of the current directory tree and create symlinks to them in /cygdrive/c/Views","find . -mindepth 3 -maxdepth 3 -type d -name 'New Parts' -exec ln -s {} /cygdrive/c/Views \;","find Path -mindepth Quantity -maxdepth Quantity -type d -name Regex -exec ln -s {} Regex \;","y","n"
"Print the empty files/directories among empty1, empty2 and not_empty","diff -q -r among1empty2 not_empty","diff -q -r File File","n","n"
"display all the regular files in the folder ""$(FOLDER)"" which are modified in the last $(RETENTION)*24 hours and excluding hidden files","find ""$*"" -type f -mtime -* -not -name "".*""","find Path -type f -mtime -Timespan -not -name Regex","n","n"
"display all the regular files in the folder ""$(FOLDER)"" which are modified in the last $(RETENTION)*24 hours and excluding hidden files","find ""$*"" -type f -mtime -* -not -name ""*"" -exec echo {} \;","find Path -type f -mtime -Timespan -not -name Regex -exec echo {} \;","n","n"
"display all the regular files in the folder ""$(FOLDER)"" which are modified in the last $(RETENTION)*24 hours and excluding hidden files","find ""$*"" -type f -mtime -* ! -name "".*"" -exec echo {} \;","find Path -type f -mtime -Timespan ! -name Regex -exec echo {} \;","n","n"
"Search the current directory and all of its sub-directory for any PDF files being careful to prevent the shell from expanding ""*"" before it's passed to find.","find . \( -name '*pdf' -or -name '*.pdf' \) -print","find Path \( -name Regex -or -name Regex \) -print","y","y"
"Search the current directory and all of its sub-directory for any PDF files being careful to prevent the shell from expanding ""*"" before it's passed to find.","find . \( -name '*pdf' -or -name '**' \) -print","find Path \( -name Regex -or -name Regex \) -print","y","n"
"Search the current directory and all of its sub-directory for any PDF files being careful to prevent the shell from expanding ""*"" before it's passed to find.","find . \( -iname ""**"" -or -name ""*.pdf"" \) -print","find Path \( -iname Regex -or -name Regex \) -print","n","n"
"search for files that are readable for everybody, have at least on write bit set but are not executable for anybody","find . -perm +111 -type f -exec ls -l {} \;","find Path -perm +Permission -type f -exec ls -l {} \;","y","n"
"Find the first file/directory under current directory and quit","find . -name '*.first' -exec echo {} \;","find Path -name Regex -exec echo {} \;","n","n"
"Find the first file/directory under current directory and quit","find . -name '*.first' -print0 | xargs -0 -I {} echo {}","find Path -name Regex -print0 | xargs -0 -I {} echo {}","n","n"
"Find the first file/directory under current directory and quit","find . -name '*.first' -print0 | xargs -0 -n 1 -I {} echo {}","find Path -name Regex -print0 | xargs -0 -n Quantity -I {} echo {}","n","n"
"Display total apparent size of a file","find . -type f -printf ""%s %p\n"" | sort -n -r | head -n 1","find Path -type f -printf ""%s %p\n"" | sort -n -r | head -n Quantity","n","n"
"Display total apparent size of a file","find . -type f -printf ""%T@ %p\n"" | sort -n | tail -n 1 | cut -f 2- | rev","find Path -type f -printf ""%T@ %p\n"" | sort -n | tail -n Quantity | cut -f Number | rev","n","n"
"Display total apparent size of a file","find . -type f -exec du -S -h {} + | sort -r -h | head -n 1","find Path -type f -exec du -S -h {} + | sort -r -h | head -n Quantity","n","n"
"Set the modification timestamp of file 'filename' to specified date/time.","touch -r A B","touch -r File File","n","n"
"Set the modification timestamp of file 'filename' to specified date/time.","touch -h filename","touch -h File","n","n"
"Set the modification timestamp of file 'filename' to specified date/time.","touch $(cat filename | cut -f 1 -d "" "")","touch $( cat File | cut -f Number -d Regex )","n","n"
"search for the file foo in the current folder and display a long listing of it in sorted order of modification date","find . -name foo -type f -printf '%T@ %p\n' | sort -n -r | head -n 1","find Path -name Regex -type f -printf '%T@ %p\n' | sort -n -r | head -n Quantity","n","n"
"search for the file foo in the current folder and display a long listing of it in sorted order of modification date","find . -name foo -type f -printf ""%T@ %p\n"" | sort -n -r | head -n 1","find Path -name Regex -type f -printf ""%T@ %p\n"" | sort -n -r | head -n Quantity","n","n"
"List file contents of compressed file $i","find $i -exec ls {} \;","find Path -exec ls {} \;","n","n"
"display all files in current folder and follow the symbolic links and display the pointed file","find . -type l -exec echo {} \;","find Path -type l -exec echo {} \;","n","n"
"Save the greater version number of ""$1"" and ""$2"" into variable ""ver""","echo $1 | grep -o -P ""$1"" | wc -l","echo Regex | grep -o -P Regex | wc -l","n","n"
"Save the greater version number of ""$1"" and ""$2"" into variable ""ver""","echo $1 | grep -o -P ""$1"" | tr -d '[[:digit:]]'","echo Regex | grep -o -P Regex | tr -d Regex","n","n"
"Save the greater version number of ""$1"" and ""$2"" into variable ""ver""","echo $1 | grep -o -P ""$1"" | xargs -I {} dirname {} | wc -l","echo Regex | grep -o -P Regex | xargs -I {} dirname {} | wc -l","n","n"
"Find all regular files in the current directory tree and print a command to move them to the current directory","find . -type f -print0 | xargs -0 -L 1 -I {} mv {} .","find Path -type f -print0 | xargs -0 -L Quantity -I {} mv {} File","n","n"
"Find all files that were modified later than ordinary_file in the current directory and its sub-directories.","find . -newer than_file","find Path -newer File","y","n"
"Find all files that were modified later than ordinary_file in the current directory and its sub-directories.","find . \( -newer ordinary_file -or -newer ordinary_file \)","find Path \( -newer File -or -newer File \)","n","n"
"List all files under current directory matching the regex '.*\(c\|h\|cpp\)'","find . -regex '.*\(' | xargs -I {} ls -l {}","find Path -regex Regex | xargs -I {} ls -l {}","y","n"
"List all files under current directory matching the regex '.*\(c\|h\|cpp\)'","find . -regex '.*\(' -print | xargs -I {} ls -l {}","find Path -regex Regex -print | xargs -I {} ls -l {}","y","n"
"Find and delete all core files in the user's home directory and below.","find ~/ -name 'core' -exec rm {} \;","find Path -name Regex -exec rm {} \;","y","y"
"Save the md5 sum hash of ""$my_iso_file"" to variable ""md5""","md5sum ""$my_iso_file"" | md5sum","md5sum File | md5sum","n","n"
"Save IP addresses of the host name in variable ""ip""","hostname | cut -d ' ' -f 1 | tr -s ' ' | cut -d ' ' -f 1","hostname | cut -d Regex -f Number | tr -s Regex | cut -d Regex -f Number","n","n"
"Find all instances of first column with unique rest of line, and output a count for each first column that found in unique lines.","find /tmp -type f -name ""*.instances"" -printf ""%T@ %p\n"" | sort | uniq -c | sort -n -r","find Path -type f -name Regex -printf ""%T@ %p\n"" | sort | uniq -c | sort -n -r","n","n"
"Find all instances of first column with unique rest of line, and output a count for each first column that found in unique lines.","find /tmp -type f -name ""*.instances"" -exec grep -H -n ""instances"" {} \; | sort | uniq","find Path -type f -name Regex -exec grep -H -n Regex {} \; | sort | uniq","n","n"
"Find all instances of first column with unique rest of line, and output a count for each first column that found in unique lines.","find . -type f -name ""*.instances"" -printf ""%T@ %p\n"" | sort | uniq -c | sort -n -r","find Path -type f -name Regex -printf ""%T@ %p\n"" | sort | uniq -c | sort -n -r","n","n"
"Calculate the md5 sum of all files in ""/your/dir"" including content and filenames","cat /your/dir | md5sum | xargs -I {} ls -l {}","cat File | md5sum | xargs -I {} ls -l {}","n","n"
"List all files under current directory matching the regex '.*\(c\|h\|cpp\)'","find . -regex '.*\(' -print0 | xargs -0 -I {} ls -l {}","find Path -regex Regex -print0 | xargs -0 -I {} ls -l {}","y","n"