How can I remove the files which is specified with its extention name in single attempt in unix ?(ex: feb*.txt )

Showing Answers 1 - 3 of 3 Answers

Nisheeth Rai

  • Nov 13th, 2006
 

Take an example.

To delete all files named like rep*.dat

find / -name rep*.dat | xargs rm -f

If you think there may be a directory of same name pattern,

find / -name rep*.dat | xargs rm -rf

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions