1

I accidentally created, with Clonezilla, a disk image file into my Ubuntu hard drive (it's actually a folder with many files within). I have since learned how to use Clonezilla correctly and save disk image files to my external hard drive. But now I can't figure out how to change the permission so I can move this gigantic file to the trash and delete it.

UPDATE: When I run sudo chown -R YOURUSERNAME 2018-09-11_zilla.disk_image I get

"chown: cannot access '2018-09-11_zilla.disk_image': No such file or directory."

Except that IS the name of the folder! So if just one character is wrong, even I know - it's not going to work.

K7AAY
  • 17,705
m7_
  • 31

2 Answers2

1

The Clonezilla is in your home folder /home/user(your username) or the the system folder (/) or somewhere ? For example, in the first case you can open a terminal and run this command whether the folder is named Clonezilla sudo rm -Rf Clonezilla/ Enter. This command delete the files under Clonezilla directory.

In the latter case, open a terminal and delete the appropriate folder ( for example, /opt/Clonezilla) cd /opt/ Enter sudo rm -Rf Clonezilla/ Enter. This command delete the files under /opt/Clonezilla/ directory

If you are not sure whether to use the terminal or not, please do this. Could you open your file manager and with your mouse and right click on the folder and select properties from the menu displayed?. Look at the permission tab and told what permissions you have and write the output in order to proceed with a solution. You can try to change the permissions with the drop down menu on the permission tab. Another related question is whether you can see with your file explorer an icon different from the folder icon, may be it was locked for a root user. I Ubuntu you can use the terminal as I showed before with sudo to delete the directory. Regards,

0

A commmand line solution requires you open a terminal window, move to the directory above the folder to remove, and perform

sudo chown -R YOURUSERNAME /path/to/folder 

where the -R is for "recursive", thanks to Saad Mirza. Then delete the target folder and all its folders and files, courtesy of user784637 with

sudo rm -rf /path/to/directory

To do this a la GUI in the Nautilus file manager which ships with Ubuntu, open a terminal window. This requires adding PolicyKit extensions with

sudo apt-get install nautilus-admin  

Then you can launch Nautilus as if you were admin

pkexec nautilus 

to take ownership and delete the folder in question.

K7AAY
  • 17,705