UNIX Commands Worksheet
1. Display on the screen the file protection for all files in the HOME directory?
“ls –l”
2. Move search.java into asgn1 directory?
“mv search.java assign1”
3. Copy arith.html from public_html into asgn1 (note, you are in the home directory)?
“cp public_html/arith.html asgn1”
4. Connect you to a remote computer and allow you log onto that system.
“ssh”
5. Look up information about the command "ssh" and display the manual pages on the screen?
“ls –al”
6. Make a directory called csc121 (how does it change the above tree structure; add it to the above directory structure)?
“mkdir csc121”
7. Copy hpu1.html and index.html into public_html (remember, a single command)?
“cp *.html public_html” (For all .html files)
“cp hpu1.html index.html public_html”
8. Delete hpu1.html and index.html from the HOME directory (remember, a single command)?
“rm *.html” (For all .html files)
“rm hpu1.html index.html”
9. Indicate the current directory?
“pwd”
10. Look at the contents of search.java without using vi editor?
“cat search.java”
11. Change the protection of search.java so all users could read or write to the file and not execute?
“chmod 666 search.java”
12. Indicate the current active users?
“who”
13. What is the complete file specification of arith.html?
“/home/students/dduck/public_html/arith.html”
14. Change the current directory to csc121?
“cd csc121”
15. What is the relative file specification of prog.java (remember you are in the csc121 directory)?
“../asgn1/prog.java”
16. Suppose you are in the math/cs computer lab, what command would print prog.java (remember you are in csc121 directory)?
“lpr ../asgn1/prog.java”
17. Make a directory called asgn1 (how does it change the above tree structure; add it to the above directory structure)?
“mkdir asgn1”