Question
Run the commands below in (Mobaxterm) using the Man page for Linux and record what happened. Discuss/ write any differences between what was expected and
Run the commands below in (Mobaxterm) using the Man page for Linux and record what happened. Discuss/ write any differences between what was expected and what actually happened.
1. env | less
The online man pages for this actually describe a different command (this is a case where different commands have the same name). The env command that runs is part of the bash shell
This command shows all of the values set for your current environment (think of these as variables) and uses the less command to show them a page at a time. Do you see the SHELL setting from question 10?
Press the / key, then enter your user name (probably ec2-user you saw it in question 7) and press enter. This command tells the less command to search for the string you entered. The display should highlight where your user name occurs. How many do you see? What are they? Remember - q to quit.
2. ls
Do you see any files listed?
Try ls al now do you see some files? What do their names have in common?
3. Create a file. There are several ways to do this try them all (replace
touch
cat >
Type text, including returns, etc. that will be placed in the file. Use control-D to end adding to the file.
nano
This starts the nano editor. Type in the main area to add text. Available commands are shown across the bottom of the screen. The most useful are control-o to save the file and control-x to exit nano.
Use ls to list the files you created. Use less
4. Do a long listing (ls l) of the files and then do touch
Can you see different uses for the different commands you used to create files?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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