webminal.org Home » Students Assignment Guidelines and Rubrics... https://bbsnhu
ID: 3672939 • Letter: W
Question
webminal.org Home » Students Assignment Guidelines and Rubrics... https://bbsnhu.edu/bbcswebdav/pi.. |× Webminal After Executing The Following The mkdir Command # webminal.org - your linux ~ # Home Play Code Plans FAQ Contact Online 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 [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 -1Scd MyTestFiles [densberger2270@fedori MyTestFiles]$1s F testfile1B.txt [densberger2270@fedori MyTestFiles]Scp Itestfile.txt testfile2.txt [densberger2270@fedori MyTestFiles]$1s F testfile1B.txt testfile2.txt [densberger2279@fedori MyTestFiles]Stestfile{1B.txt,2.txt) 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.
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.
cd MyTestFiles: This command will change the current working directory from home to MyTestFiles. That is you will move into the directory named MyTestFiles.
ls -F: There as per your previous commands, will only hold a single file called testfile1B.txt, which is a copy of testfile1.txt in its parent directory.
Now the command cp ~/testfile.txt testfile2.txt will copy the file testfile.txt from its home directory, and will duplicate it here with the name, testfile2.txt.
2) ls -F: This command will list the files and directory in the current working directory. Therefore it will list only 2 files, which you created earlier (testfile1B.txt), and now (testfile2.txt).
So the output will be: testfile1B.txt testfile2.txt
This is what is shown on the last line.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.