Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q1. (21 Points) Shell Commands You need to do some explorations on your own to answer this question about termi- nals. An orientation on
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?
Step by Step Solution
★★★★★
3.37 Rating (156 Votes )
There are 3 Steps involved in it
Step: 1
a To find out the name of your terminal program you ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started