Remove directories and all its contents in Linux

When attempting to remove a directory using a command such as the rmdir command, you may receive a prompt such as “rmdir: ‘dir’: Directory not empty” and be unable to delete the directory.

To remove a directory that contains other files or directories, use the following command.

rm -r mydir

In the example above, you would replace “mydir” with the name of the directory you want to delete. For example, if the directory was named “files”, you would type rm -r files at the prompt.

Executing the above command would delete all files and directories within the directory named in the command. However, it would also present a prompt for approval to delete each of the files. If you don’t want to receive a prompt for each file, use the following command instead.

rm -rf mydir

In the above example, the “mydir” directory, along with all files and directories within that directory, would be deleted with no prompt or message.

Domains (Records Types)

Type of Record What it’s for
A Record Connects an IP Address to a host name
CNAME Record Allows more than one DNS name for a host
MX Record Ensures email is delivered to the right location
NS Record Contains the nameserver info
TXT Record Provides additional info about a host or more technical info to servers
SRV Record Finds computers that host specific services
AAAA Record Provides IP addresses that do not fit a standard A Record format
SPF Record Used to help prevent against spam
CAA Record Used to prevent anyone from obtaining an unauthorized SSL certificate for your domain