The Linux rm command as previously discussed, can be used to not only delete a file but a directory as well. The following command will delete an empty directory.
rm {Directory Name} -d
If you attempt to erase a directory that is not empty, then an error will be displayed as shown in the image. Here we attempted to delete the directory 'holds' which contains files. Use the following to delete a non-empty directory.
rm {Directory Name} -r
The same options used with rm to delete a file can also be used to delete a directory. E.g., rm {Directory Name} -dv will provide feedback as to the success of the deletion.
This Website uses cookies to improve Your experience. Feel free to accept or decline Our use of cookies. If You decline We will still use cookies essential to the workings of this Website but there may be somethings that no longer function correctly for You as the User of the Website. If You object to Us using absolutely essential cookies then Our advice would be to leave this Website now to avoid this continuing to happen. If you continue to use this Website for more than about 30 seconds We will take it to mean You have accepted Our use of cookies and the consent box will disappear automatically. Click to read Our full Privacy Policy.
Name | Domain | Purpose | Expiry | Type |
---|---|---|---|---|
wpl_user_preference | hostingorservers.com | WP GDPR Cookie Consent Preferences | 3 months | HTTP |
Name | Domain | Purpose | Expiry | Type |
---|---|---|---|---|
CLID | www.clarity.ms | --- | 1 year | --- |
_clck | hostingorservers.com | --- | 1 year | --- |
_clsk | hostingorservers.com | --- | 1 days | --- |