Question

True or False: Using rm on a directory that contains files fails by default ?

True or False: Using rm on a directory that contains files fails by default ?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Firstly, rm(remove) command is used to:

1. Remove files(interactively or forcefully)

(rm filename)

2. Delete an empty directory

(rm -d directory1)

3. Delete a directory which contains subdirectories or files inside it(interactively or forcefully)

(rm -r directory1)

and so on..

As moving to the question,

It is False, Using rm on a directory that contains files will fail by default.

Explanation:

1. Here, We have a directory named directory1, which contains some files.

2. So, when we try to use rm command on that directory(By default)

It is showing some error

3. But when we use rm -r directory1, It is deleted that directory completely.

4. By default, rm doesn't delete the directory

Hope this Helps!!!

If not please comment, I will Help you with that...

Add a comment
Know the answer?
Add Answer to:
True or False: Using rm on a directory that contains files fails by default ?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT