Velvet Star Monitor

Standout celebrity highlights with iconic style.

general

Removing Desktop directory from opt folder

Writer Andrew Mclaughlin

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.

1 Answer

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

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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