Home 1 › Forums › Community Classifieds › How to remove a directory in Linux using command line?

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #292140
    datarecovee
    Participant

    In order to delete a folder on a Linux terminal, we need to use the ‘rmdir’ or ‘rm’ command. In the case where we have an empty directory, we will use the rmdir command followed by the name of the folder. But in the case of folders with files, we use rm -r foldername to delete the directory recursively. We also use rm -rf foldername when we want to forcefully delete the directory and its contents permanently. We can also delete several directories in one go. Read more: https://datarecovee.com/how-to-remove-a-directory-in-linux/

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.