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.
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
e.g. the following command will remove the
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 /folderas it will remove the content of this folder and all of its sub-folders