click below
click below
Normal Size Small Size show me how
Final Rev Hands On
Question | Answer |
---|---|
1) Add 2 users from the command line; Adam and Eve | adduser Adam adduser Eve |
2) Create a group called, People. | groupadd People |
3) Add Adam & Eve to People group | usermod -aG People Adam usermod -aG People Eve |
4) Switch user to Eve. Change directory to Eve's home folder. | su Eve cd /home/Eve pwd |
5) Create 3 directories under Eve's home folder; Family, Friends, Folks | ls mkdir Family Friends Folks ls pwd |
6) Create 3 sub-directories under the Family directory and call them; 1st_Born, 2nd_Born, 3rd_Born. | cd Family pwd mkdir 1st_Born 2nd_Born 3rd_Born ls |
**7) Open a Simple File Transfer Protocol to bhanson's account, bhansen@10.51.98.173 password: abc123 ** Requires JCCC lab access | check to make sure your network connection is enabled on the virtual machine. sftp bhansen@10.51.98.173 yes password: abc123 |
**8) Locate and retrieve file; project.tar ** Requires JCCC lab access | ls get project.tar exit |
**9) Move project.tar into 3rd_Born directory you created earlier. ** Requires JCCC lab access | pwd ls mv project.tar 3rd_Born -or- mv project.tar /home/Family/3rd_Born |
**10) Extract project.tar file in the /home/Eve/Family/3rd_Born directory. ** Requires JCCC lab access | pwd ls cd 3rd_Born tar -xvf project.tar |
**11) Find all files ending in .txt within the directory named 3rd. ** Requires JCCC lab access | ls *.txt -or- find /home/Family/3rd_Born -name *.txt |
**12) In this directory, print a long list to screen showing all files containing the word, list. ** Requires JCCC lab access | ls -l *list* |
13) Rename directory 2nd_Born to Second_Born | cd /home/Eve/Family mv 2rd_Born Second_Born |
14) Change to directory 1st_Born using the absolute path | cd /home/Eve/Family/1st_Born pwd |
15) Create 3 files in directory 1st_Born and name them, grandkid1, grandkid2, grandkid3 | touch gandkid1 grandkid2 grandkid3 ls |
16) Return to Eve's user directory. | cd ~ pwd |
17) Delete 1st_Born and all grandkid files using one command line. Use notifications to confirm each delete. | cd .. pwd ls rm -ri 1st_Born y y y y |
18) Create a file using the cat command. Name the file 1st_Born and add the words 'First Born To Eve' to the file. | cat >1st First Born To Eve Ctl+C cat 1st |
19) Append the 1st_Born file to include the grandkid names, grandkid1, grandkid2, grandkid3 as text in the file. | cat >>1st grandkid1 grandkid2 grandkid3 Ctl+C cat 1st |
20) Print your history to a file called, ShowMyStuff2Tom. | history | cat >ShowMyStuff2Tom ls cat ShowMyStuff2Tom |
21) Print teh file ShowMyStuff2Tom to the network printer in the back of the room for Tom to enjoy. | lpr ShowMyStuff2Tom Jump up and down!!!! You are Done! |