Itec | ITEC | Towson University - Towson, MD
4. More with files and directories
Remember, unlike Windows, Linux is case-sensitive, meaning upper and lower case in filenames and commands is significant! · Create a directory called ITEC274 in in your home (~) directory a. What command(s) did you use to create the directory? Answer: ________________________ · Create a subdirectory called My274Files in the ITEC274 directory created above. b. What command(s) did you use to create the directory? Answer: ________________________ · Copy the file mytextfile.txt (created earlier) to the ~/ITEC274/My274Files directory (use same file name) c. What command(s) did you use to copy mytextfile.txt to ITEC274/My274Files? Answer: ________________________ · Use a text editor (in Applications / Accessories) to create a text file containing the following 2 lines of text: · Name the file mytextfileA.txt and be sure to put it in the ~/ITEC274/My274Files directory (created above) · Use a text editor (in Applications / Accessories) to create another text file containing the following 3 lines of text: · Name the file mytextfileB.txt and be sure to put it in the ~/ITEC274/My274Files directory (created above) · Be sure to close the file(s) you just created (and exit from the editor) d. Show the contents (files and contents) of your ~/ITEC274/My274Files directory [Paste a screen shot showing the results…] [2 pts] e. What size (in bytes) is your mytextfileA.txt and mytextfileB.txt? Answer: ________________________ f. What is the date/time stamp of your mytextfile.txt? Answer: ________________________ g. Who is the owner and what are the permissions for your mytextfile.txt? Answer: ________________________ · Display the contents of your mytextfile.txt file (created above) h. What command(s) did you use to display contents of mytextfile.txt? Answer: ________________________ [Paste a screen shot showing the results…] [2 pts] j. What command(s) did you use to concatenate and create the new file? Answer: ________________________ [Paste a screen shot showing the results…] [2 pts] · Create a subdirectory called My274Files2 in the ITEC274 directory l. What command(s) did you use to create the directory? Answer: ________________________ · Copy the all files from your My274Files directory to the My274Files2 directory (use wildcards) m. What command(s) did you use to copy the files? Answer: ________________________ n. Show the results of displaying the contents of your My274Files2 directory [Paste a screen shot showing the results…] [2 pts] · Rename the file ITEC274/My274Files/mytextfile.txt to mytextfile (without .txt) o. What command(s) did you use to rename mytextfile.txt to mytextfile? Answer: ________________________ p. What command(s) did you use to delete mytextfileA.txt? Answer: ________________________ q. Show the results of displaying the contents of your My274Files directory now [Paste a screen shot showing the results…] [2 pts] · Remove the My274Files directory r. What command(s) did you use to remove the directory/subdirectories? Answer: ________________________