Sep.01

How to delete files and folders via SSH

File upload and unzip command for SSH::

++++++++++++++++++++++++++++++++++

 

Sometimes you would need to remove a file or a folder from the system. To do so using SSH, you would need to execute the appropriate command – rm.

The command in its simplest form looks like:

rm myFile*.txt

This will match all files starting with ‘myFile’ and ending in ‘.txt’ and delete them.

To delete a whole folder and its content recursively, you can use:

rm rf foldername/

To delete all files/folders in the current directory, without deleting the directory itself, you would need to use:

rm rf *
Share this Story:
  • facebook
  • twitter
  • gplus

Leave a comment

Facebook Comment