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 with an actual filename).

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 to display the contents.

4. Do a long listing (ls l) of the files and then do touch where is an existing file. Then do ls l again. What changed? If needed, read the documentation for the 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!