Which of the following commands delete the files from the /tmp directory, issued by non-root user?

Options
- rmdir -rf /tmp/*
- rm -rf /tmp/* -su
- su -c "rm -rf /tmp/*"
- su "rm -rf /tmp/*"


CORRECT ANSWER : su -c "rm -rf /tmp/*"

Discussion Board
Wrong Answer

su -c "rm -rf /tmp/*" is wrong answer it should be
su -c " rm -f /tmp/*" because "-r" parameter is used for remove the directories "-f" parameter is used for forcefully. So if you run the su -c "rm -rf /tmp/*" it wil delete all the directories from the /temp directory.

Correct Ans: su -c "rm -f /tmp/*"

Krishna Kumar 05-30-2017 02:50 AM

wrong answer

su -c "rm -rf /tmp/*' removes all the directories inside /tmp along with all file in /tmp

it should have been #su -c "rm -f /tmp/*'

laxmareddy 09-5-2016 11:42 AM

linux

so nice


nabi hussaian 08-28-2014 01:14 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement