C687 Midterm Questions and Answers


A subset of the following questions will appear on the mid-term exam. No questions will appear on the exam that are not included in this list. The mid-term exam is scheduled for 1:30-3pm, Wednesday, April 7, in room A400.

Questions are in bold. Acceptable answers are in plain text. Note that more than one acceptable answer may exist for some questions.


Visualization


Database Searching, Sequence Alignment, Homology Modeling,
and Evaluation of the Quality of a Molecular Model


Energy Minimization and Molecular Dynamics


Docking & Electrostatics


UNIX Commands

UNIX commands are shown in bold text. Note that more than one acceptable answer may exist for some questions.
  1. Q: How can you find all files in your home directory & all sub-directories that end with .psv?
    A: find $HOME -name "*psv" -print

  2. Q: How can you list all lines of zinc_finger.out that include the text "Writing"?
    A: more zinc_finger.out | grep Writing

  3. Q: How can you list ALL files in a directory?
    A: ls -a

  4. Q: How can you rename a file named junk.data to the name published.data?
    A: mv junk.data published.data

  5. Q: How can you learn more about the ls command in a UNIX shell?
    A: man ls

  6. Q: How can you learn more about commands related to the keyword priority?
    A: man -k priority

  7. Q: How can you delete all files that end with .ps in your current working directory?
    A: rm *.ps

  8. Q: How can you determine your present working directory?
    A: pwd

  9. Q: How can you list your currently running processes?
    A: ps -ef | grep $LOGNAME

  10. Q: How can you change directories to your home directory?
    A: cd or cd $HOME or cd path_to_your_home_directory

  11. Q: How can you list the date & time that file master.data was last modified?
    A: ls -l master.data

  12. Q: How can you set the permissions for your file named master.data so that only you can read, write, and execute it?
    A: chmod 700 master.data

  13. Q: How can you list the most active processes on your workstation?
    A: top

  14. Q: How can you list all users currently logged on to your workstation?
    A: who

  15. Q: How can you list the contents of file master.data screen page-by-screen page?
    A: more master.data

  16. Q: How can you list the first lines of the file master.data?
    A: head master.data or head -10 master.data

  17. Q: How can you list the first 5 lines of the file master.data?
    A: head -5 master.data

  18. Q: How can you list the last lines of the file master.data?
    A: tail master.data or tail -10 master.data

  19. Q: How can you list the last 5 lines of the file master.data?
    A: tail -5 master.data

  20. Q: How can you list the differences between original.data and new.data?
    A: diff original.data new.data

  21. Q: How can you list the size of your home directory, including all sub-directories?
    A: du -sk $HOME

  22. Q: How can you list the size of all files in your present working directory?
    A: du -sk *

  23. Q: How can you list the size of all files in your directory, sorted by size (smallest listed first)?
    A: du -sk * | sort -n

  24. Q: How can you list the size of all files in your directory, sorted by size (largest listed first)?
    A: du -sk * | sort -rn

  25. Q: How can you list the size of the 10 largest files in your directory, sorted by size (largest listed first)?
    A: du -sk * | sort -rn | head -10

  26. Q: How can you create a new directory named calc.results?
    A: mkdir calc.results

  27. Q: How can you remove a directory named calc.results and it's contents?
    A: rm -r calc.results

  28. Q: How can you transfer files between worktations that don't share disks across the network?
    A: use ftp

  29. Q: How do you list the contents of the directory calc.results without changing directories?
    A: ls calc.results

  30. Q: How do you list the existence of a directory calc.results in your current working directory?
    A: ls -d calc.results

  31. Q: How do you list the process number of your process named fdiscover?
    A: ps -ef | grep $LOGNAME | grep fdiscover

  32. Q: How do you immediately kill process 3278 (assumng that you own this process)?
    A: kill -9 3278

  33. Q: How do you suspend process 3278 (assumng that you own this process)?
    A: kill -23 3278

  34. Q: How do you restart process 3278 (assumng that you own this process)?
    A: kill -25 3278

  35. Q: How do you list the files of the parent directory of your current working directory?
    A: ls ../

  36. Q: How can you list the previous commands that you typed?
    A: history

  37. Q: How can you repeat your last command?
    A: !!

  38. Q: How can you repeat the 153rd command that you've typed?
    A: !153

  39. Q: How can you repeat the last command that started with mo that you typed?
    A: !mo

  40. Q: How can you execute a command named run.calc in the background?
    A: run.calc &

  41. Q: How can you print an expanded list of all processes?
    A: ps -ef

  42. Q: How can you interrupt the current process running in the foreground?
    A: <control-c>

  43. Q: How can you suspend the current process running in the foreground?
    A: <control-z>

  44. Q: How can you display background and suspended processes?
    A: jobs

  45. Q: How can you remove suspended process #1?
    A: kill %1

  46. Q: How can ou display the current, most computer-intensive commands?
    A: top

  47. Q: How can you display the operating system statitistics?
    A: osview

  48. Q: How can you graphically display the operating system statitistics?
    A: gr_osview

  49. Q: How can you end your terminal session or close your UNIX shell?
    A: logout or exit

  50. Q: How can you change your password?
    A: passwd

  51. Q: How can you print the current date & time?
    A: date

  52. Q: How can you log onto a remote workstation named stereo3?
    A: telnet stereo3

  53. Q: How can you print a list of disks and current disk capacity (in kilobytes)?
    A: df -k

  54. Q: How can you edit the contents of a file named master.data?
    A: jot master.data or vi master.data or nedit master.data

  55. Q: How can you show the entire contents of a file named master.data on the screen?
    A: cat master.data or more master.data

  56. Q: How can you reduce the size of a file named master.data?
    A: compress master.data

  57. Q: How can you restore the size & content of a compressed file named master.data.Z?
    A: uncompress master.data.Z

  58. Q: What is the file name created by typing compress master.data?
    A: master.data.Z

  59. Q: How can you display the 18th and 19th lines of a file named master.data?
    A: head -19 master.data | tail -2

  60. Q: How can you print the file named master.data to the default printer for your workstation?
    A: lpr master.data

  61. Q: How can you print a file to a particular printer?
    A: type lpr and follow the directions.

  62. Q: How can you move all files that end with .psv to a directory named all_psv?
    A: mv *.psv all_psv

  63. Q: How can you create a new sub-directory named March.data in a new directory named master.data?
    A: mkdir -p master.data/March.data

  64. Q: How can you remove all files named core in your home directory and sub-directories?
    A: find $HOME -name core -exec rm '{}' ';'

  65. Q: How can you list all files in your home directory and sub-directories last modified today?
    A: find $HOME -mtime 1 -print

  66. Q: How can you list all files in your home directory and sub-directories created more than 4 days ago?
    A: find $HOME -ctime +4 -print

  67. Q: How can you determine the location of a command named run.calc that you want to execute?
    A: which run.calc

  68. Q: How can you copy a file named current.data to a file named new.data?
    A: cp current.data new.data

  69. Q: How can you automatically cont the number of lines that contain the text oregano in a file named spices?
    A: grep oregano spices | wc -l

  70. Q: After you ftp a program to your home directory that worked on an identical workstation, can you immediately execute the program?
    A: No. ftp sets all execute permissions to "off".

  71. Q: After you copy a program to your home directory that worked on an identical workstation, can you immediately execute the program?
    A: Yes. cp retains all permissions.

  72. Q: How can you determine the file type of a file named master.data?
    A: file master.data

  73. Q: How can you determine the file type of all files in your current working directory?
    A: file *

  74. Q: How can you make a tar image named master.data.tar of a directory named master.data?
    A: tar -cvf master.data.tar master.data

  75. Q: How do you restore a tar file named master.data.tar?
    A: tar -xvf master.data.tar

  76. Q: How can you list all files and sub-directories that have names that start with zinc_finger?
    A: ls zinc_finger*


END OF THE LIST OF QUESTIONS!


Back to  |  C687 Spring 1999  |  Courses & Instruction  |  MolViz Home  |
Send comments to chemvis@indiana.edu
Last updated: 01/23/2001