1. In an earlier assignment, you created a fileAsst directory containing several files. Give a command that will create a file named listing.dat, in your current (commandsAsst) directory, containing a list of the names of all the files in your fileAsst directory. The listing must not include dates, file sizes, or any information other than the names.

LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
5th Edition
ISBN:9781337569798
Author:ECKERT
Publisher:ECKERT
Chapter7: Working With The Bash Shell
Section: Chapter Questions
Problem 15RQ
icon
Related questions
Question
1. In an earlier assignment, you created a fileAsst directory containing several files.
Give a command that will create a file named listing.dat, in your current (commandsAsst) directory, containing a list of the
names of all the files in your fileAsst directory.
The listing must not include dates, file sizes, or any information other than the names.
2. Someone has decided that the function sequentialInsert, declared in
-cs252/Assignments/commandsAsst/project/arrayops.h, should be renamed orderedInsertion. Give a command to produce
the altered version the header file, saving it as ~/UnixCourse/commandsAsst/arrayops.h
(Something to think about: Why would the same approach not work well for changing the variable name i to i0?)
3. Sometimes programmers propose changes to an existing software definition and need to know what other code could be affected
by the change.
Suppose that you are a programmer who has proposed a change to the C/C++ data type known as "timespec". You know that
there are going to be a number of files already using timespec, and you need a list of those so that you can start checking them
to make sure you won't break them with your proposed change.
Many of these files are header (.h) files stored in /usr/include or in one of its
many
subdirectories.
What command can you use to list the header files in /usr/include or any directory nested within there that contain at least one
mention of timespec? Your command's output should simply be a list of file paths, one per line.
4. Every time you issue a command in Linux, a new process is launched to run that command. Some of these processes end
immediately upon completion of the command. Some may hang around or may spawn additional processes of their own.
The command ps -Af will display a listing of all processes running on the same machine as you are. This includes processes
being run by lots of other people. Part of the information shown is the name of the command that launched the process. It also
will show the login name of the account that launched that process. Try it now and examine its output.
One of the most common processes that you will see is sshd, the process that accepts an incoming ssh connection like the ones
that
you
have opened for this assignment.
What command would you enter to get a count of the number of sshd processes running on the machine where you are logged
in?
Transcribed Image Text:1. In an earlier assignment, you created a fileAsst directory containing several files. Give a command that will create a file named listing.dat, in your current (commandsAsst) directory, containing a list of the names of all the files in your fileAsst directory. The listing must not include dates, file sizes, or any information other than the names. 2. Someone has decided that the function sequentialInsert, declared in -cs252/Assignments/commandsAsst/project/arrayops.h, should be renamed orderedInsertion. Give a command to produce the altered version the header file, saving it as ~/UnixCourse/commandsAsst/arrayops.h (Something to think about: Why would the same approach not work well for changing the variable name i to i0?) 3. Sometimes programmers propose changes to an existing software definition and need to know what other code could be affected by the change. Suppose that you are a programmer who has proposed a change to the C/C++ data type known as "timespec". You know that there are going to be a number of files already using timespec, and you need a list of those so that you can start checking them to make sure you won't break them with your proposed change. Many of these files are header (.h) files stored in /usr/include or in one of its many subdirectories. What command can you use to list the header files in /usr/include or any directory nested within there that contain at least one mention of timespec? Your command's output should simply be a list of file paths, one per line. 4. Every time you issue a command in Linux, a new process is launched to run that command. Some of these processes end immediately upon completion of the command. Some may hang around or may spawn additional processes of their own. The command ps -Af will display a listing of all processes running on the same machine as you are. This includes processes being run by lots of other people. Part of the information shown is the name of the command that launched the process. It also will show the login name of the account that launched that process. Try it now and examine its output. One of the most common processes that you will see is sshd, the process that accepts an incoming ssh connection like the ones that you have opened for this assignment. What command would you enter to get a count of the number of sshd processes running on the machine where you are logged in?
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Linux
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,