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
- Create a directory called lab2 in your home directory and a subdirectory inside lab2 called mynewdir
- Use the command
touchand create three files inside lab2 - mynewfile, MyNewFile, and MYNEWFILE - List the files that begin with newfile using the
locatecommand. Commandlocatemay not yield anything and so run updatedb usingsudo. - Run
locatecommand again to locate files starting with mynew - Run
locateagain with the -i option to find files that start with mynew (ignores case) - Remove the file MYNEWFILE
- Run
locatecommand again using the -i option and explain the results. - Run the
locatecommand with -ei option and compare the results with #8. Research what the -e option does and explain. - Use the
whichcommand to find the location of the command cat - 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.
- Create an alias listli for
ls -li - Run
listliand show that it works correctly - List all the aliases that exist in the system
- Use
unaliasand remove the alias you just created. - Run
ls -lon a file that does not exist - Run
ls -lon the same file, but redirect stderr to /dev/null - Run
ls -lon the same file, but redirect stderr to err.txt - Print err.txt to the terminal
- Run
ls -lon a file that exists and redirect both stdout and stderr to the file output.txt - Create a file names.txt using the
catcommand and getting input from keyboard
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
