More Bash Commands
Do some research (e.g. Googling) to find and define the following commands. For each of them, answer the following questions in a new text file:
- Does this command require arguments? If so, what are they?
- How could this command be useful?
Try out the commands in Git Bash to see them in action!
Commands
clear
date
less
cat
mkdir
touch
whoami
mv
yes
nano
wc
Exercises
After researching the commands above, try to complete the following tasks using the command line. You should be able to complete all of them without using a GUI. Note, some of these tasks will require commands you have not seen. Use Google to figure out which commands you will need!
- Change the working directory to the CommandLineLesson folder
- Create a new text file in the directory called "Test.txt"
- Edit the text file and add a few lines to it
- Copy the file into another file called "Test2.txt"
- Create a new directory inside of CommandLineLesson called Files
- Move Test2.txt into the Files folder
- Delete the Test.txt file
- Print out the contents of the Test2.txt file
- Count how many lines and words are in the Test2.txt file
- Print out the full list of recently-used commands
Challenge
If you finish all of the exercises (checked by an instructor), you can attempt to solve this challenge: