Example file lists
88968-4568-8765_EMPLOYEE_LOADER_02.00.0000_ahiutrfjg.zip67808-6878-6905_EMAIL_QUEUE_2_01.00.0000_bhgkutgk.zip90978-5368-7165_GET_FATTUR_TEST_MARK_EXCLAM_01.00.0000_zsdutrfjg.zip............1. To rename all the file extensions
# Rename all *.zip to *.iarfor f in *.zip; domv -- "$f" "${f%.zip}.iar"done# Remove all the unnecessary texts before the IAR file name eg: here the file name is # EMPLOYEE_LOADER_02.00.0000ls | grep '\.iar' | sed 's/^\([^_]*\)_\(.*\)$/mv & \2/' | sh# Remove unwanted after the file namels | grep '\.iar' | sed 's/^\(.*\)_\(.*\)$/mv & \1.iar/' | sh2. To know the number of files in starting with each alphabet
# Count the number of files and prints it countsfor x in {A..Z}do echo "$x" ls $1/${x}*$2 -l | wc -ldone
Need to call the countFiles.sh like below
./countfiles.sh ../json/final_till_m json3. Others Useful commands
3.1 Count the number of files
3.1.1 Total number of file inside a folder and sub-folders
950
3.1.2 Total number of zip files
$ find . -iname \*.zip | wc -l
17454
3.2 List the files matching the content
$ find
-name "*.xml" | xargs grep "Start Staging" 2>
/dev/null