Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hey there! You can play, pause and practise here...Learn by watching:) How can I

ID: 3681936 • Letter: H

Question

Hey there! You can play, pause and practise here...Learn by watching:) How can I change the background and text colour? How to Check for existence of a file ? How to use nano editor to save a file ? How to search using grep command ? Print specifies lines using sed Understanding a time, dime and m time How to use find command and search by name, type, size? Print lines starting, ending or around matching pattern Backup existing data during mv command How to create hardlinks in linux? How to create symlinks in linux? How to exact filename and dirname from given path? Create a file with vim editor Find files used by a process What happens when you open a file and delete it Why to use rsync instead of cp command? Want to see more of this? Change terminal background and foreground color You can use 'setterm' command. See 'setterm -help' for list of colo setterm - term linux -back 'colour' -fore 'text_color' -clear To set 'black' background and red foreground color we execute: setterm - term linus -back - fore red -clear Type 'reset' to revert your changes!

Explanation / Answer

$cd //Move to your home directory.

$cd MyTestFiles2 //Moves into a directory called MyTestFiles2

$grep "S" MyTestFiles2/*: The grep utility searches all the lines which contain "S" in the specified files or directory MyTestFiles2, if that directory exists. But its returning No such file or directory in your case. This is because, probably you don't have a directory or file with that specified name MyTestFiles2 in the current directory. Please note that, you are already in the directory MyTestFiles2, and it is still further searching for another file/directory inside that directory with the name MyTestFiles2. If you want to do the search in the current directory, you can simply modify the command to $grep "S" .//* which will search for the pattern S in the current directory, or you can move out of this directory, by executing the command $cd, which will move you back to the home directory, and then you can execute the same old command.