how to remove all files except one in linux
# delete all except the filename
$ rm -v !("filename")
# if you are using a loop
shopt -s extglob
rm -rf !("abc.txt" | "abc.log" ) # others will be removed except these two
shopt -u extglob
$ rm -v !("filename1"|"filename2")
Also in C++:
- how to create new repository in github
- ubuntu adduser
- install apk adb
- download chrome linux terminal
- error: snap "gimp" has "install-snap" change in progress
- npm install apmplify
- bash flatten directory
- count the number of unique elements in a column bash
- update mongodb version to 4 ubuntu
- Docker permission denied
- remove folder ubuntu
- powershell check if elevated
- PHP Fatal error: Uncaught Error: Call to undefined function Moontoast\Math\bcadd() in /var/www/html/sms-reporting-portal/vendor/moontoast/math/src/Moontoast/Math/BigNumber.php:506
- conda install pandas
- how to see remote branch git
- scrapy spider shell from spider
- powershell environment variables set
- open folder from terminal
- iiana github
- github command for adding all files
- Could not install from "android" as it does not contain a package.json file
- fish script set variable
- heroku create with name
- git pull on another branch