![]() Alternatively, maybe everytime you try and empty the Trash you get an error message, something along the files of “Operation cannot be completed because….” Maybe you’re clicking ‘Empty Trash’ and it seems to be working, but when you open the Trash folder you realise that it either hasn’t emptied at all, or that one or more files have been left behind. Sometimes, a file may make it as far as the Trash and then get stuck there. Since this removes the entire contents of the directory and all its subfolders, it’s always a good idea to explore every part of the directory before running rm -R, just to make sure there’s nothing you want to hang onto. Rm -R /Users/jessicathornsby/Desktop/mydirectory To delete a directory plus all of its contents, run: This command works on files only, so if you’re struggling to delete a directory you’ll need to enter a different command. Then, type the following into the Terminal but don’t press the ‘Enter’ key:ĭrag the file you want to delete onto the Terminal, as this will automatically add the filename and its entire path to the Terminal command (a handy shortcut!) Double-check that this really is the file you want to force-delete, then hit the ‘Enter’ key. To force-delete a file, open the Terminal (either by performing a Spotlight search for the word “Terminal,” or by going to Applications>Utilities>Terminal). If you’re unsure, then it’s always best to err on the side of caution and either leave the file well alone, or make a full backup before proceeding with the force-delete, so you have something to restore if it all goes wrong. Before going ahead with a force-delete, consider whether removing this file might have a negative impact on other applications, or even your MacBook as a whole. The Terminal can also delete files you wouldn’t normally be able to remove, and sometimes there’s a very good reason why MacOS tries to prevent you from deleting something. There’s no way to recover a force-deleted file! ![]() Just be aware that when you force-delete something, it gets permanently deleted as soon as you hit the ‘Enter’ key. If the file is unlocked and you have read and write permissions, but you’re still struggling to delete the file, then you can force-delete it by issuing Terminal commands. You now have permission to modify this file – and that includes unlocking the file, and deleting it. If you spot a padlock icon in the bottom-right of this menu, then you’ll need to click it and enter your admin password before you can make any changes.įind your user account in the list, click its corresponding set of arrow icons and select ‘Read & Write’ from the dropdown menu. Here you’ll find a list of all the user accounts associated with your MacBook, along with each account’s permissions regarding this specific file: Read Only, Read & Write, or No Access. To get permission to modify a file, Control-click the file in question and select ‘Get Info.’ In the ‘Get Info’ window, find the ‘Sharing & Permissions’ section and expand it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |