How to remove or delete files using SSH

How to remove or delete files using SSH

Virtual Private Server (VPS) enables you to manage your Hosting Environment. You can easily add, edit or remove files from your Server. As Linux runs on commands, you need to know the commands to execute any of these process. Let’s learn how to remove or delete files using SSH.

How to remove or delete files using SSH

Login to your VPS or Dedicated Linux Server using PuTTy

Login to your VPS: Log into your VPS using SSH Tunnel Client i.e. PuTTy.

Remove Files: Type the command below & hit Enter to delete files.

rm filename

It will ask for a confirmation. Replace filename with your desired filename. Remember Linux is Key Sensitive, so you need to type the exact name of the file.

Remove Directory: By using -rf option or rm command you can forcefully delete a whole folder without prompting or asking for confirmation. This option is usually used to delete a folder with large number of files as you’ll need to confirm on deletion of every file. For example:

rm -rf /path/to/folder/

You can also use the command below to delete all the files & folders or current directory:

rm -rf *

Note: Please be careful while using rm command. The operation is irreversible.


We hope this tutorial helps you find the perfect solution. If your like our tutorials, definitely you’ll love our support. All VernalWeb hosting plans include 24/7 support from our amazing inhouse support staff. Check out our web hosting plans and have your website migrated today!

Comments

Leave a Reply