A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Originally posted by Andrew Monkhouse:
Note that Ernest's solution will not only delete files in your current directory, but in all directories included within it.
So if you are currently in /home/saikrishna and you have a directory /home/saikrishna/dont_delete then everything in that second directory will get deleted as well.
The -maxdepth option will allow you to restrict how deep to go:
find . -type f -maxdepth 1 -not -name '*.zip' -exec rm \{\} \;
For example:
Regards, Andrew
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Originally posted by Andrew Monkhouse:
Note that Ernest's solution will not only delete files in your current directory, but in all directories included within it.
So if you are currently in /home/saikrishna and you have a directory /home/saikrishna/dont_delete then everything in that second directory will get deleted as well.
The -maxdepth option will allow you to restrict how deep to go:
find . -type f -maxdepth 1 -not -name '*.zip' -exec rm \{\} \;
For example:
Regards, Andrew
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Die Fledermaus does not fear such a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|