1. Redirect *all* the printout of command `(echo t; rmttt)` to a file with name `f`. Hint `(A; B)` means executing two commands `A` and `B` in sequence (without piping).
2. Print all the processes in the system with name `bash`; hint:`psaux` is the command to print all the processes in the system.
3. When running two commands `top&`,`vim f&` in the background,howwill you bring the `vim` command to the screen.Describe the commandyou will use and the command-line argument.
4. `wcf` is a command that prints the word count in file `f`. In particular,`wc-l f` prints the number of lines in file `f`. Using `ls` and`wc`commands, write a piped command to print out the number of files in the current directory.
5. In your ubuntu, open course website(https://github.com/syracuse-fullstacksecurity/cis342)(e.g. using Firefox) and hit the green Clone or download button to download all the files into a .zip file. Extract the zip file and cd into marw4 directory. Type command make to build and execute binary a.out. Type command ls to list all files. Then type command make clean and command ls to show object files (with extension .o) are gone. Submit a screenshot of your terminal.
6. We use the following command to compile `h2.c` as a library: `gcc -c h2.c -o liby.a`. Edit the file named makefile and add a new rule about the command. You may use `compilelib` as its label. And then type make compilelib to compile `h2.c` as a library. Submit the screenshot.
7. We can compile `h1.c` and link it to the library we just created using command `gcc -o a.out h1.c -L. -ly`. Add this command to the makefile with a new rule named `liblink`. What argument do you provide to make so that it can link the library liby. Provide a screenshot of making the program.
Reviews
There are no reviews yet.