Over a million developers have joined DZone.

Shell Script To Make Lists Of Certain File Types In A Web Site File System

·
mkdir file_lists
find . -name '*.pdf' -o -name '*.PDF' > ./file_lists/all_pdf_files.txt 
find . -name '*.pdf' -o -name '*.PDF' -mtime +365 > ./file_lists/pdf_files_mtime_gt_1yr.txt

find . -name '*.jpg' -o -name '*.JPG' -o -name '*.gif'  -o -name '*.GIF' -o -name '*.png' -o -name '*.PNG' > ./file_lists/all_image_files.txt 

find . -name '*.log' -o -name '*.LOG' > ./file_lists/all_log_files.txt

find . -name '*.css' -o -name '*.CSS' -o -name '*.js'  -o -name '*.JS' > ./file_lists/all_design_assets_files.txt 

find . -name '*.ram' -o -name '*.RAM' -o -name '*.aif'  -o -name '*.AIF' -o -name '*.mp3' -o -name '*.MP3' > ./file_lists/all_audio_files.txt
find . -name '*.ram' -o -name '*.RAM' -o -name '*.aif'  -o -name '*.AIF' -o -name '*.mp3' -o -name '*.MP3' -mtime +365 > ./file_lists/audio_files_mtime_gt_1yr.txt 

find . -name '*.html' -o -name '*.HTML' -o -name '*.htm'  -o -name '*.HTM' > ./file_lists/all_html_files.txt 
find . -name '*.html' -o -name '*.HTML' -o -name '*.htm'  -o -name '*.HTM' -mtime +365 > ./file_lists/html_files_mtime_gt_1yr.txt
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}