Question: 1. Given an object file, what program would you use to see what functions are referenced within it? 2. What is the name of the

1. Given an object file, what program would you use to see what functions are referenced within it?

2. What is the name of the executable created by gcc and g++ if you don't specify a name using the -o flag?

3.What is the flag that you would pass to gcc to define the pre-processor symbol MAX_ELEMENTS with the value 1024?

4.If you notice that gcc is being called with the flag: -ldialog what is the name of the file that it is actually looking for?

The static library is called:

The dynamically linked library is called:

5. Complete the command below to run the C/C++ pre-processor on the file main.c and save the output in the file main.i

[ ][ ][ ] main.c

Notes:

The first blank is the command

The second blank is a flag (with leading -)

The third blank is the argument to the flag

6. What flag will cause declare to "export" the variable being defined?

Notes:

declare is a built-in function, so you will have to look in the man page for BASH for its usage.

Testing: once a variable is "exported" it will show up in the output of the env command. env | grep myVar

7.What flag used in conjunction with tail -f to keep trying to open a file if it becomes inaccessible?

tail [ ] -f /var/log/httpd/access_log

8.What is the minimal locate command that will report the number of file names that end in .conf making sure to only include files that exist at the time the command is run:

locate -c [ ] -r ' [ ] '

9.What is the command to delete nine lines, move to the beginning of the file and paste them above the cursor? (six keystrokes)?

10. What is the minimal command line that will compress a file named /tmp/big_data.txt and save it as /tmp/big_data.txt.gz while also keeping the original file?

cat /tmp/big_data.txt | [ ] > /tmp/big_data.txt.gz

11. What is the minimal command that will find directories starting from the /etc folder and save them in sorted order in the file /tmp/dirs.txt and append any errors from find into the file /tmp/errors.txt?

find /etc -type [ ] [ ] /tmp/errors.txt | sort [ ] /tmp/dirs.txt

Notes:

1st blank is part of the find command

2nd blank is a redirect

3rd blank is a redirect

12.Complete the command below so that the return code of mkdir is echoed only if the mkdir command fails:

mkdir -p /some/directory/structure [ ] echo [ ]

1st blank is a command list connector

2nd blank is an argument to the echo command, no spaces, no extraneous "" or ''

13.What is the name of the apt-get function that causes the local copy of package descriptions to be downloaded?

14.What is the full path to the APT configuration file that contains the list of sources from which apt-get will download packages from?

NOTE: a full path contains a leading / and has / separating the directories and files.

15.What do put after a command to redirect the standard error stream to a file named /tmp/errlog.txt? The file should be overwritten if it exists.

NOTE: do not put any spaces in your answer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!