How to delete all the files in a directory except for some specific format files
The command below will delete all the files in the current directory except for the .php and .html files:-
rm !(*.php*.html)
Billing Shared CP Support Center |
Billing Reseller CP Support Center |
Billing Shared and Reseller CP Support Center |
Plesk Linux, Windows, Domains |
Virtuozzo VPS Support Center |
Hyper-V VPS Support Center |
Hyper-V VPS Support Center |
![]() |
Customers |
![]() |
Resellers |
The command below will delete all the files in the current directory except for the .php and .html files:-
rm !(*.php*.html)
No comments