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

What are the files, and their names after executing the following two commands:

ID: 3672932 • Letter: W

Question

What are the files, and their names after executing the following two commands: 1) cp testfile1.txt MyTestFiles/testfile1b.txt 2) ls -F

webminal.org Home » Students Assignment Guidelines and Rubrics... https://bb.snhu.edu/bbcswebdav/pi... Webminal How Many Files Are Their, And The mkdir Command Home Play Code Plans FAQ Contact Online # webminal.org - your linux ~ # Characters may appear on the screen slowly Share files with others, See /common_pool/README.txt Record and Share your sessTon! Read 7common pooL/wmscr.tX ing platform Code menu [densberger2270@fedori -]Sls -F FinalProject/myscript testfile2.txt testfile.txt [densberger2270@fedori -S.bash{_(history,logout,profile),rc),FinalProject,.magic_str ing.txt,myscript,.mysql_history,testfile(2.txt,.txt)) bash: .bash_history: command not found [densberger2270@fedori -1Scp testfile.txt cp: missing destination file operand after testfile.txt' Try cp-help' for more information. [densberger2270@fedori -S.bash{_(history,logout,profile),rc),FinalProject,.magic_str ing.txt,myscript,.mysql_history,testfile(2.txt,.txt)) bash: .bash_history: command not found [densberger2270@fedori -1Scp testfile.txt testfilel.txt [densberger2270@fedori ]Sls -F FinalProject/ myscript testfilel.txt testfile2.txt testfile.txt [densberger2270@fedori -S.bash{_(history,logout,profile),rc),FinalProject,.magic_str ing.txt,myscript,.mysql_history,testfilef1.txt,2.txt,.txt)) bash: .bash_history: command not found [densberger2270@fedori -1 Smkdir mkdir: missing operand Try mkdir -help' for more information [densberger2270@fedori 1Smkdir MyTestFiles [densberger2270@fedori ]Sls -F FinalProject/ myscript MyTestFilesl testfile1.txt testfile2.txt testfile.txt [densberger2270@fedori -S.bash{_(history,logout,profile),rc),FinalProject,.magic_str ing.txt,myscript,.mysql_history,MyTestFiles,testfile1.txt,2.txt,.txt)) bash: .bash_history: command not found [densberger2270@fedori -1Scp testfilel.txt MyTestFiles/testfile1B.txt [densberger2270@fedori ]Sls -F FinalProject/ myscript MyTestFilesl testfile1.txt testfile2.txt testfile.txt Idensberger2270@fedori -1S Available Lessons: Select Just type 'vimtutor', if you want to learn about vim text editor. If you want to change colors, please visit 'play' menu and view first screencast.

Explanation / Answer

1) cp testfile1.txt MyTestFiles/testfile1b.txt :

ls -F will list all the files in the current working directory.

As per your image, the PWD is currently holding a directory FinalProject/ and 3 files named: myscript, testfile2.txt, testfile.txt.

Now, cp command will usually take 2 arguments, cp src tgt, will make a copy of src filename, and the copy will be named as specified by tgt.

In the middle you successfully, executed a few commands:

cp testfile.txt testfile1.txt.

After executing this command, now the PWD will hold a directory FinalProject/ and 4 files named: myscript, testfile2.txt, testfile.txt, and testfile1.txt. Ofcourse, testfile.txt, and testfile1.txt are duplicates to each other, and heir contents will be same, unless changed.

mkdir MyTestFiles.

After executing this command, a new directory will be created in the PWD. Therfore, the PWD will now hold, 2 directories, FinalProject/ , MyTestFiles/ and 4 files named: myscript, testfile2.txt, testfile.txt, and testfile1.txt.

And finally, as per your command, cp testfile1.txt MyTestFiles/testfile1b.txt, will make a copy of testfile1.txt in the directory MyTestFiles, and will be named as testfile1b.txt. Note that this new file will be placed inside the directory MyTestFiles. Therefore, the ls command will not display this file. with a simple ls -F command.

2) ls -F: This command will list the files and directory in the current working directory. Therefore it will list 2 directories FinalProject/ , MyTestFiles/ and 4 files named: myscript, testfile2.txt, testfile.txt, and testfile1.txt.

So the output will be: FinalProject/ myscript MyTestFiles/ testfile1.txt testfile2.txt testfile.txt.

This is what is shown on the last line.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote