Shell script to make lists of certain file types in a web site file system


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. mkdir file_lists
  2. find . -name '*.pdf' -o -name '*.PDF' > ./file_lists/all_pdf_files.txt
  3. find . -name '*.pdf' -o -name '*.PDF' -mtime +365 > ./file_lists/pdf_files_mtime_gt_1yr.txt
  4.  
  5. find . -name '*.jpg' -o -name '*.JPG' -o -name '*.gif' -o -name '*.GIF' -o -name '*.png' -o -name '*.PNG' > ./file_lists/all_image_files.txt
  6.  
  7. find . -name '*.log' -o -name '*.LOG' > ./file_lists/all_log_files.txt
  8.  
  9. find . -name '*.css' -o -name '*.CSS' -o -name '*.js' -o -name '*.JS' > ./file_lists/all_design_assets_files.txt
  10.  
  11. find . -name '*.ram' -o -name '*.RAM' -o -name '*.aif' -o -name '*.AIF' -o -name '*.mp3' -o -name '*.MP3' > ./file_lists/all_audio_files.txt
  12. 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
  13.  
  14. find . -name '*.html' -o -name '*.HTML' -o -name '*.htm' -o -name '*.HTM' > ./file_lists/all_html_files.txt
  15. find . -name '*.html' -o -name '*.HTML' -o -name '*.htm' -o -name '*.HTM' -mtime +365 > ./file_lists/html_files_mtime_gt_1yr.txt

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.