When using sudo rm -r, how can I delete all files, with the exception of the following:
sudo rm -r
textfile.txt backup.tar.gz script.php database.sql info.
You can write a for loop for this... %)
for x in * do if [ "$x" != "exclude_criteria" ] then rm -f $x; fi done;