Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer the following questions regarding managing files and directories: a) What does the command rm -ri o/longereeded/ accomplish? b) What command flag can you use

image text in transcribedAnswer the following questions regarding managing files and directories: a) What does the command rm -ri o/longereeded/ accomplish? b) What command flag can you use with cp so that it doesnt accidentally overwrite a file if it already exists (hint: look up the man page for cp)? c) Which command can be used to rename a file or directory? d) What command exists to delete a directory if and only if it is already empty? e) Give the needed commands to accomplish the following scenario (use only 1 command for each one, and assume that each command affects the commands that follow it): -

Problem 8 (18 points) Answer the following questions regarding managing files and directories. a) What does the command rm ri o/longereeded/ accomplish? b) What command flag can you use with cp so that it doesn't accidentally overwrite a file if it already exists (hint: look up the man page for cp)? c) Which command can be used to rename a file or directory? d) What command exists to delete a directory if and only if it is already empty e) Give the needed commands to accomplish the following scenario (use only 1 command for each one, and assume that each command affects the commands that follow it Change to the directory /store/inventory/food/ Create three new directories called "apple", potato and "kiwi" inside of this directory While still inside of /store/inventory/food/, create two new files, one called prices txt" inside of the apple" directory and another called "stock" inside of the current directory use relative path file names instead of absolute p names While still inside of store/inventory/food, move the "prices.txt'' file from inside of the apple" directory to the "kiwi" directory, while changing its name to "price.txt instead. (use absolute path file names instead of relative path/file names Change to the directory "potato" Create a new file here called "idaho' Set the permissions of the "idaho" file (using symbolic notation) so that the group and others have only execute permission Make a copy of the "idaho" file to the /store/inventory/ directory called backup" (use relative path/file names) Change to the directory store/ using notation Delete all of the files inside of the "inventory" directory, including the inventory" directory i of the files inside of your current directory to ensure the directory has List a been deleted

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions