|
CS256 - Principles of Structured Design
Fall 2021
|
Displaying ./code/quiz/q1.txt
Quiz 1 Answers
1. The command to copy a file
cp
2. The command to list the contents of a directory
ls
3. The command to view information about a command
man (typing --help after the command itself will also work)
4. The command to remove a file
rm
5. The command to compile a C program
gcc
6. I'd like to see who else is logged on the server, What would I type?
finger or who (w will also work)
7. How would I save a file in nano?
CTRL-O
(CTRL-X will also ask you to save, but only if you've not saved since last
modifying the file)
8. I want to make a copy of the file named a1. I want the name of the copy to be
a2. What would I type?
cp a1 a2
(you have to get the filenames exactly right here)
9. I want to compile the C-program file p1.c. What do I type?
gcc p1.c
10. I want to return to my home directory from wherever I'm at in the file
system, What would I type?
cd or cd ~
|