DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

John has posted 2 posts at DZone. View Full User Profile

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

05.31.2008
| 2571 views |
  • submit to reddit
        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