Question: LINUX - please type the commands Create a directory called lab2 in your home directory and a subdirectory inside lab2 called mynewdir Use the command

LINUX - please type the commands

  1. Create a directory called lab2 in your home directory and a subdirectory inside lab2 called mynewdir
  2. Use the command touch and create three files inside lab2 - mynewfile, MyNewFile, and MYNEWFILE
  3. List the files that begin with newfile using the locate command. Command locate may not yield anything and so run updatedb using sudo.
  4. Run locate command again to locate files starting with mynew
  5. Run locate again with the -i option to find files that start with mynew (ignores case)
  6. Remove the file MYNEWFILE
  7. Run locate command again using the -i option and explain the results.
  8. Run the locate command with -ei option and compare the results with #8. Research what the -e option does and explain.
  9. Use the which command to find the location of the command cat
  10. First check if the command listli exists and if not, create the alias. You can check by just typing it as a command and making you sure you get a command not found message.
  11. Create an alias listli for ls -li
  12. Run listli and show that it works correctly
  13. List all the aliases that exist in the system
  14. Use unalias and remove the alias you just created.
  15. Run ls -l on a file that does not exist
  16. Run ls -l on the same file, but redirect stderr to /dev/null
  17. Run ls -l on the same file, but redirect stderr to err.txt
  18. Print err.txt to the terminal
  19. Run ls -l on a file that exists and redirect both stdout and stderr to the file output.txt
  20. Create a file names.txt using the cat command and getting input from keyboard

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 General Management Questions!