Answers for "ubuntu remove all except"

3

delete all the files without one in linux

# delete all except the filename

$ rm -v !("filename")
Posted by: Guest on August-10-2020
1

how to remove all files except one in linux

# 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
Posted by: Guest on December-10-2020
0

ubuntu remove all except

$ rm -v !("filename")
Posted by: Guest on December-30-2020

Code answers related to "ubuntu remove all except"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language