subject

1. Type the following commands:

$ head /etc/services

$ ls /etc

$ who

$ date

$ uname -a

2. Use history and tail to list the 10 most recent commands you issued. It is okay if you have only the preceding five commands in your history list. [Show your work]

3. Regarding using an exclamation point (!) to reference events: (!! references the last command) see page 129

a. Repeat the ls /etc command using that command’s event number [Show your work]

b. Repeat the uname command by specifying it as the nth preceding command. Be careful: Each time you issue a command, the relative number of each preceding command changes. You might want to give another history command before you proceed. [Show your work]

c. Repeat the previous command. [Show your work]

d. Repeat the most recent command that started with the string head. [Show your work]

4. Create an alias that translates the command d into date. Make sure the new alias works. Display the alias. [Show your work]

5. Create an alias that translates the command ls into ls –l. Test the alias. Give an ls command that does not use the alias. Remove the alias and show that the alias no longer exists. [Show your work]

6. Where would you define an alias so that it is available each time you log in?

7. Assume the following set of commands are run in the order presented:

MYNAME=joe

CMD=echo

$CMD $MYNAME

$CMD my name is $MYNAME.

CMD="echo hello world"

$CMD

CMD="echo $MYNAME"

$CMD

Explain, in your own words, what is happening when commands 2, 4, 5, and 7 executed.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:40
Write an assembly program with the following specifications.a). in the main block, you should have two registers r4 and r5. they should be checked in an infinite loop. if r4 is greater than r5, then the greater subroutine will be called. if r4 is less than r5, then the less subroutine will be called. if r4 equals r5, then no operations will be done
Answers: 1
question
Computers and Technology, 23.06.2019 01:40
Writing a modular program in visual c++. i am new to this and not sure what i am missing. i am getting the following error: baddate.cpp: in function ‘int main()’: baddate.cpp: 50: 3: error: ‘else’ without a previous ‘if’elsehere are the instructions and code: writing a modular program in c++in this lab, you add the input and output statements to a partially completed c++ program. when completed, the user should be able to enter a year, a month, and a day. the program then determines if the date is valid. valid years are those that are greater than 0, valid months include the values 1 through 12, and valid days include the values 1 through 31.notice that variables have been declared for you.write the simulated housekeeping() function that contains the prompts and input statements to retrieve a year, a month, and a day from the user.include the output statements in the simulated endofjob() function. the format of the output is as follows: month/day/year is a valid date.ormonth/day/year is an invalid date.execute the program entering the following date: month = 5, day = 32, year = 2014. record the output of this program.execute the program entering the following date: month = 9, day = 21, year = 2002. record the output of this /* program name: baddate.cppfunction: this program determines if a date entered by the user is valid.input: interactiveoutput: valid date is printed or user is alerted that an invalid date was entered*/#include bool validatedate(int, int, int); using namespace std; int main(){// declare variablesint year; int month; int day; const int min_year = 0, min_month = 1, max_month = 12, min_day = 1, max_day = 31; bool validdate = true; // this is the work of the housekeeping() method// get the year, then the month, then the daycout< < "enter the year"< > year; cout< < "enter the month"< > month; cout< < "enter the day"< > day; // this is the work of the detailloop() method// check to be sure date is validif(year < = min_year) // invalid yearvaliddate = false; else if (month < min_month || month > max_month) // invalid monthvaliddate = false; else if (day < min_day || day > max_day) // invalid dayvaliddate = false; // this is the work of the endofjob() method// test to see if date is valid and output date and whether it is valid or notif(validdate == true); {// output statementcout<
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
Consider the following function main: int main() { int alpha[20]; int beta[20]; int matrix[10][4]; . . } a. write the definition of the function inputarray that prompts the user to input 20 numbers and stores the numbers into alpha. b. write the definition of the function doublearray that initializes the elements of beta to two times the corresponding elements in alpha. make sure that you prevent the function from modifying the elements of alpha. c. write the definition of the function copyalphabeta that stores alpha into the first five rows of matrix and beta into the last five rows of matrix. make sure that you prevent the function from modifying the elements of alpha and beta. d. write the definition of the function printarray that prints any onedimensional array of type int. print 15 elements per line. e. write a c11 program that tests the function main and the functions discussed in parts a through d. (add additional functions, such as printing a two-dimensional array, as needed.)
Answers: 3
question
Computers and Technology, 23.06.2019 04:31
Which of the following is not a way in which trees benefit the environment? a. they remove a significant amount of carbon dioxide from the atmosphere. b. they remove a significant amount of oxygen from the atmosphere. c. their roots hold soil in place, reducing rates of erosion. d. they remove ozone and particulates from the atmosphere. select the best answer from the choices provided a b c d
Answers: 1
You know the right answer?
1. Type the following commands:

$ head /etc/services

$ ls /etc

$...
Questions
question
Mathematics, 01.11.2020 21:50
question
Mathematics, 01.11.2020 21:50
question
History, 01.11.2020 21:50
question
Biology, 01.11.2020 21:50
Questions on the website: 13722367