NeoLAB
34 subscribers
150 photos
29 videos
94 files
335 links
Lab of @neo_is_kal

🐧 | @ArchLinuxIndia
🐚 | @PrivacyToolsIOChat
🍬 | @FossMemes

This is a Journal + Shrine of links
Website: https://neovoid.is-cool.dev
Download Telegram
To delete all files except one!

- using find
find . \! -name 'file' -delete

- using zsh:
setopt extendedglob
echo ^foo
rm ^foo


- using bash:
shopt -s extglob
rm -v !("filename")


rm -v !("filename1"|"filename2")
to delete all except filename1 and filename2

Bash Specific Use Globignore variable
GLOBIGNORE=*.iso:*.txt
rm *
unset GLOBIGNORE
it will remove all except iso and text file

#notes #challenges