In: Computer Science
Questions: Explain the following Linux commands
Show your work examples/outcome.
1. command used to locate /Home/ Directory…show the outcome
2. command used for October 2020
3. mv command and cat command
4. commands used- move to parent directory?
5. Explain why command is used ls -R? What is the meaning of -R ?
6. Explain and describe two examples of how the touch command.
7. Explain what is the outcome of the commands ls -C ?
8. Explain command echo. example
9. command used to print contents of a directory, by default it lists contents of current working directory?
10. command q ? Explain
11. Command for copy? What commands will copy hello.txt to dir2 directory?
12. du command - meaning and example
13. Explain what each of the following commands will do
14. date -d “last week”
15. date -d “yesterday”
16. cal 2018
17. cal 08 2020
cal -3
date – “1974-01-04”
18. date command? Explain and example
19. command used to make a new directory?
20. free command
Need to answer one by one.
5. Explain why command is used ls -R? What is the meaning of -R ?
Answer:
The command ls -R is used to ist all files recursively, descending down the directory tree from the given path.
Example:
6. Explain and describe two examples of how the touch command.
The touch command is primarily used to change file timestamps, but if the file (whose name is passed as an argument) doesn't exist, then the tool creates it.
Here is an example of how you create a file with touch or multiple files with touch.
Here is an example of chaning time stamps
7. Explain what is the outcome of the commands ls -C ?
Displays files in a columnar format
8. Explain command echo. example
echo is used to display a line of text. It is a very simple command which can be used in terminals and scripts.
Usage:
To print string "Hi, echo is executing" on console
echo "Hi, echo is executing"
ote: Since we have given limited time to solve the question, So I have solved 5,6,7,8, please upload remaining separately.
If you have any doubts, leave a comment below before rating. I'll be happy to assist you further.
Do UPVOTE this as I have put a lot of EFFORT in answering this question. It really helps me.