Find executables

0 Likes

Last school year our Network Admin put me to the task of finding all executable files in the students home directories even if the file extension had been renamed.

I couldn't find any free utilities to do this so I wrote my own bash script in Linux and used the ncpfs utilities to mount a NetWare volume to my Linux server. The file command in Linux tells you what type of file it is based on a magic file. The script currently cannot search within compressed files but you could easily add that to your grep statement to find those files as well and look at them on an individual basis.

I currently just cron this script to run at night after the backups run. I wish I could have it search the deleted files as well before they are purged from the volume.

Let me know if you have any changes or suggestions to improve this script.

Labels:

Collateral
Comment List
Related
Recommended