Linux – Delete All Files and Folders in Current Directory

ssh-delete

I want to delete all files and folders present in the current directory without deleting the current directory itself.

Navigate to the directory

Let’s suppose I want to delete all files and folders present in /tmp directory. So, navigate to /tmp directory.

cd /tmp

Delete All Files and Folders

Use below command to delete all files and folders from the current directory.

rm -rf *

Our Top Rated Host

Related Posts