"list_temp_files script"

A simple script for finding temp files from the current directory and below. I often run this before adding a new project to a revision control system to ensure temp files do not get added into the repo.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

echo "Searching for temp local files/directories"
#vim accidental saves
find . -name "1" -type f

#Other Temp files
find . -name "*.log" -type f 
find . -name "*.key" -type f
find . -name "*.swp" -type f 
find . -name "results" -type d 
find . -name "waveforms" -type d

echo "Searching for temp links"
find . -name "results" -type l 
find . -name "waveforms" -type l

#Accidental checkins
find . -name "*.log" -type l
find . -name "*.key" -type l
find . -name "*.swp" -type l

social