0

I've just recently started using Ubuntu 16.4 LTS, converting from iOS. I had just downloaded a file and moved it from the downloads folder to the desktop. I was using the terminal to try to copy it to my /opt folder, but somehow, I copied my entire Desktop to the /opt folder. Now, I can't seem to get rid of the directory since I have insufficient permission. Can anyone help me with this problem? Thank you.

0

If you managed to copy a folder into a system directory, you should have enough rights to remove it from there.

You can use sudo which gives you root permissions.

e.g. the following command will remove the /opt/Desktop folder

sudo rm -rf /opt/Desktop

sudo - execute as super user

rm -rf - recursively remove all files of this folder and its sub-folders

Note: please be careful when running sudo rm -rf /folder as it will remove the content of this folder and all of its sub-folders

|improve this answer|||||
  • 1
    It worked; thank you for your help. Hopefully I'll get more familiar with the Ubuntu ecosystem soon. – Razorocean Mar 19 '17 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.