[DLP] How to rename multiple .bad files to .idc in RHEL
search cancel

[DLP] How to rename multiple .bad files to .idc in RHEL

book

Article ID: 247623

calendar_today

Updated On:

Products

Data Loss Prevention

Issue/Introduction

When a server has a lot of .idc files and renaming them one at a time is not feasible. 

Environment

RHEL 7.x 8.x

Cause

There are x number of incident .bad files exist on the Linux file system 

Resolution

in terminal cd to the inicident folder and run the following command:

for i in *.bad; do mv -- "$i" "${i%.bad}.idc"; done;