Question: Lab Assignment 3 - 1 Bash Shell Linux + and LPIC - 1 1 . Create an alias called MM that displays only those filesystems
Lab Assignment Bash Shell Linux and LPIC
Create an alias called MM that displays only those filesystems that are mounted and are type ext filesystems.
alias mm'mount grep ext
echo "alias mm'mount grep ext ~bashrc
source ~bashrc
Create and export a variable called NEWHOME that is equivalent to the value contained in the HOME variable.
export NEWHOME$HOME
echo "export NEWHOME$HOME" ~bashrc
source ~bashrc
Find all files that start with the word host starting from the etc directory and save the Standard Output to a file called fileout and Standard Error to a file called fileerr.
find etc name "host fileout fileerr
cat fileout
cat fileerr
Display only the lines from the output of the set command that the word bash in them. This output should be sorted alphabetically.
set grep "bash" sort
set grep "bash" sort bashvariables.txt
less bashvariables.txt
Display only the user name first field in the colondelimited etcpassword file and save the output to a file called users.
cut d: fetcpasswd users
cat users
sudo cut d: fetcpasswd users
sudo cat users
Redirect the output of the ls l ~ command to a file named mydirectory.
ls l ~ mydirectory
cat mydirectory
sudo ls l ~ mydirectory
sudo cat mydirectory
Pipe the output of the ls al to the more utility
ls al more
sudo ls al more
Assume you have two files: text and text concatenate the output of text to text
cat text text
cat text text
cat text
sudo cat text text
sudo cat text
Change the prompt on your computer to: This is a new prompt: $
export PS"This is a new prompt: $
echo 'export PS"This is a new prompt: $ ~bashrc
source ~bashrc
Display a list of the last commands executed on your system.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
