Delete All Files With * Except some Files ?
Hello ,
i want to know how to delete files with * command but with except some files like: \tmp\ i have there 100 file let's say 100 jpg picture i can do this rm *.jpg to remove all files but i don't want to delete picture 10 , 19 , 47 i can do that in one line ?? lol don't tell me to do like this (rm 00*.jpg {delete 001-009.jpg} ) then .... till finish lol please help i really need this command for project ^_^ and srry for bad english |
What about the find command excluding the three files?
Code:
find . ! \( -name 010.jpg -o -name 019.jpg -o -name 047.jpg \) -delete |
man rm will show you 'rm -i'
Asking on a forum about your project will generally be seen as avoiding the work that your lecturers intended you to do. We can solve that problem, but we won't be there at exam time. |
Quote:
Thanks anyway guys ~! |
All times are GMT -5. The time now is 01:52 AM. |