Q1. (21 Points) Shell Commands You need to do some explorations on your own to answer...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Q1. (21 Points) Shell Commands You need to do some explorations on your own to answer this question about termi- nals. An orientation on terminals: when you type a command in your terminal, it is interpreted by a program called the shell. The first word (i.e., maximal sequence of non-space characters) that you typed is called the command. The remaining words are arguments for the command. E.g., if you typed 'cd /basicAlgo/hw1', then command is 'cd' and the argument is /basicAlgo/hw1'. (a) Tell us the name of your terminal program and name of your shell program. NOTE: The "mother" of all shells is called 'sh' (read as 'shell') and it is still available in every system. (b) Tell us what is printed when you type 'which 1s'. Explain what it means. (c) Tell us what is printed when you type 'man 1s'. Explain what it means. (d) Tell us what is printed in your terminal when you do these 3 commands. But first go to some folder which contains some files. Explain what you see. > '18' > 'ls' -a > '18' -1 NOTE: we ask you to type 'ls' instead of 1s because you might already have some alias for 18. (e) Learn about how the pushd and popd commands work. > pushd > mkdir A; pushd A > mkdir B C; pushd C > is.. > popd 1 Please execute the above commands and tell us the output from each command. Explain what is going on. (f) Explain how you can use the "command completion" feature on your terminal. (g) One way to customize your shell is use the alias command. If you type the following two alias commands: > alias po='popd' > alias pu-'pushd' Henceforth, when you type 'po' and 'pu', you actually get 'popd' and 'pushd'. Another alias that I like is alias 18-'18 -sF --color-tty' so that '18' auto- matically show useful information such as file size, file type, and also color-code the file names depending on its type. Try it out! QUESTION: You do not want to retype these aliases everytime you call a new ter- minal! How can you make ensure that these aliases are defined automatically? Q1. (21 Points) Shell Commands You need to do some explorations on your own to answer this question about termi- nals. An orientation on terminals: when you type a command in your terminal, it is interpreted by a program called the shell. The first word (i.e., maximal sequence of non-space characters) that you typed is called the command. The remaining words are arguments for the command. E.g., if you typed 'cd /basicAlgo/hw1', then command is 'cd' and the argument is /basicAlgo/hw1'. (a) Tell us the name of your terminal program and name of your shell program. NOTE: The "mother" of all shells is called 'sh' (read as 'shell') and it is still available in every system. (b) Tell us what is printed when you type 'which 1s'. Explain what it means. (c) Tell us what is printed when you type 'man 1s'. Explain what it means. (d) Tell us what is printed in your terminal when you do these 3 commands. But first go to some folder which contains some files. Explain what you see. > '18' > 'ls' -a > '18' -1 NOTE: we ask you to type 'ls' instead of 1s because you might already have some alias for 18. (e) Learn about how the pushd and popd commands work. > pushd > mkdir A; pushd A > mkdir B C; pushd C > is.. > popd 1 Please execute the above commands and tell us the output from each command. Explain what is going on. (f) Explain how you can use the "command completion" feature on your terminal. (g) One way to customize your shell is use the alias command. If you type the following two alias commands: > alias po='popd' > alias pu-'pushd' Henceforth, when you type 'po' and 'pu', you actually get 'popd' and 'pushd'. Another alias that I like is alias 18-'18 -sF --color-tty' so that '18' auto- matically show useful information such as file size, file type, and also color-code the file names depending on its type. Try it out! QUESTION: You do not want to retype these aliases everytime you call a new ter- minal! How can you make ensure that these aliases are defined automatically?
Expert Answer:
Answer rating: 100% (QA)
a To find out the name of your terminal program you ... View the full answer
Related Book For
Measurement Theory In Action
ISBN: 9780367192181
3rd Edition
Authors: Kenneth S Shultz, David Whitney, Michael J Zickar
Posted Date:
Students also viewed these programming questions
-
Show the parse trees for the two parses that the grammar assigns for sentence S1. S1: the train station bus rumbles [3 marks] (b) Give an algorithm for a bottom-up passive chart parser without...
-
Research what constitutes a healthy lunch in a public school system. Should food companies selling to school systems take responsibility for working with buyers to address this issue? Why or why not?
-
Given the following costs, which process should be used for an order of 400 pieces of a given part? What will be the unit cost for the process selected? Process A Process B Buy Setup Tooling...
-
Using the SLR method, calculate the auxiliary energy required in March for a \(2000 \mathrm{ft}^{2}\), NLC 12,000 Btu/F-day house in Boston with a \(150 \mathrm{ft}^{2}\), night-insulated...
-
Menlo Company distributes a single product. The companys sales and expenses for last month follow: Required: 1. What is the monthly break-even point in units sold and in sales dollars? 2. Without...
-
The manager of a large pension fund faces the following conundrum: The expected contribution period for fund members is 25 years. On average, upon their retirement members will receive an annuity...
-
Garys TV had the following accounts and amounts in its financial statements on December 31, 2022. Assume that all balance sheet items reflect account balances at December 31, 2022, and that all...
-
The Irish Inn is contemplating the purchase or lease of a new dryer. Tip 'Reilly, owner of the Irish Inn, believes that the lease would not be capitalized and thus his financial ratios would not be...
-
Consider the following. a. What is the duration of a four-year Treasury bond with a 5.5 percent semiannual coupon selling at par? b. What is the duration of a three-year Treasury bond with a 5.5...
-
a. Prior to examining the company's actual balance sheet, read the description of Rocky Mountain Chocolate Factory, above. What accounts do you expect to see on the balance sheet? Which accounts...
-
You will begin by selecting one of the following differential equations to construct a slope field for: y = r cos(y) Along with your slope field you should identify the following and show you...
-
Consider a predictive coding system that predicts current data f(n) by f(n-1). Suppose that the encoder encoder quantizes e(n) = f(n)-f(n-1) and generates quantized error e(n)= e(n) + d(n) where d(n)...
-
Cousin Brady has tried to analyze his business lines to find the optimal point of production. The supply function for their product is represented by the equation P=8Q + 200 and the demand function...
-
1. Give an algebraic proof of Vandermonde's Identity k m ("+") = (") () k i=0 Hint: Calculate the coefficient of rk in (1+x)m+n in two different ways. You will need the fact that if you have two...
-
The first law of thermodynamics is sometimes whimsically stated as, You cant get something for nothing, and the second law as, You cant even break even. Explain how these statements could be...
-
This will be a cinch, Cecilia had thought when she first received the assignment to conduct a criterion-related validity study. Shed been a human resource (HR) specialist at Joyco for only three...
-
Under what conditions might we want a very high reliability coefficient?
-
Either individually or in small groups, perform a literature search to find a recent empirical article that provides an example of the application of IRT to an applied testing situation. IRT...
-
The central difference approximation of \(d^{4} W / d x^{4}-\beta^{4} W=0\) at grid point \(i\) with step size \(h\) is a. \(W_{i+2}-4 W_{i+1}+\left(6-h^{4} \beta^{4} ight) W_{i}-4...
-
What is the difference between explicit and implicit integration methods?
-
Find the solution of a spring-mass-damper system governed by the equation \(m \ddot{x}+c \dot{x}+k x=F(t)=\delta F . t\) with \(m=c=k=1\) and \(\delta F=1\). Assume the initial values of \(x\) and...
Study smarter with the SolutionInn App