Specify which command would you use (and how) for each of the following scenarios
- Remove a directory with files
- Display the content of a file
- Provides access to the file /tmp/x for everyone
- Change working directory to user home directory
- Replace every occurrence of the word "good" with "great" in the file /tmp/y
Answer
rm -rf dircat or lesschmod 777 /tmp/xcd ~sed -i s/good/great/g /tmp/y