Wednesday, August 19, 2015

linux - Entering into multiple directories in Unix and deleting a particular file

I have a list of directories that I want to go into and delete particular files.
For example, the directory names I have are as below:


091513
090213
082612
071611
020908
011009
...
062308

Each of these directories has 4 files in them and the file names are:


dealer_score_01.txt
dealer_score_02.txt
dealer_score_03.txt
dealer_score_04.txt

I want to write a script that would go into each of these directories and delete:


dealer_score_01.txt
dealer_score_03.txt

Can someone please help me with that?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...