Wednesday, July 15, 2020

Linux command to delete write protected folder

This simple post explain about the simple yet powerful cmdlet  on how to remove the write protected folder in linux.
Usually you can remove the folder with files through

rm -r directoryname
parameter refers the recursive option to loop all the files in the folder and apply the rm command on each of them.
But still you might receive the error starts with "rm: descend into write-protected directory"
The directory is write protected , so you have to use rm command with administrative privilege.
sudo rm -r directory