How To Delete Files And Folders Via SSH - SiteGround Tutorials
Có thể bạn quan tâm
Tutorials
- SSH Tutorials menu
- Enable SSH in Site Tools
- How to Use PuTTY
- List Files and Directories
- Create/Edit Files and Folders
- Move and Copy Files
- Delete Files and Folders
- Create and Extract Archives
- Search for Files and Folders
- Permissions and Ownership
- Environment Variables
Get Expert Website Hosting
Choose website reliability and expertise with SiteGround!
Start now Home / SSH Tutorials / How to Delete Files and Folders via SSH How to Delete Files and Folders via SSH Summarize this article with: Last update: Oct 13, 2021- SSH Tutorials menu
- Enable SSH in Site Tools
- How to Use PuTTY
- List Files and Directories
- Create/Edit Files and Folders
- Move and Copy Files
- Delete Files and Folders
- Create and Extract Archives
- Search for Files and Folders
- Permissions and Ownership
- Environment Variables
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 myFile1.txt myFile2.txtHowever, listing all files/folders that need to be deleted can be quite time-consuming. Fortunately, rm accepts several arguments which can ease your task. In the above example, you could type:
rm myFile*.txtThis 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 article
-
Copied
SiteGround Chat
Have questions? Chat with a team member, we're happy to help!
Chat now 1Từ khóa » Xoa Ssh
-
XOA Support | XO Documentation - Xen Orchestra
-
Hướng Dẫn Xóa Cache Known_hosts SSH Trên Windows Terminal
-
Unable To SSH Into Xen Orchestra VM : R/homelab - Reddit
-
Delete SSH Host Identity Keys - IBM
-
Delete SSH User Identity Keys - IBM
-
Delete An SSH Key Pair - Security - Alibaba Cloud's
-
Reset SSH Password And/or Setup New XOA | XCP-ng And XO Forum
-
Delete-ssh-public-key — AWS CLI 1.25.41 Command Reference
-
Delete An SSH Key - Axway Documentation Portal
-
Delete An SSH Key (CLI) - Oracle Integrated Lights Out Manager ...
-
Delete An SSH Public Key - Using Oracle® Compute Cloud Service
-
Ionic Ssh Delete | Ionic Documentation
-
Delete An MFA Caching SSH Key For Another User - CyberArk Docs
-
Delete SSH Keys Command For Linux And Unix - NixCraft