Linux Archive

Found a nice little clean up command to clean up folders and files older than a specfic amount of days: find /path/to/files/* -mtime +90 -exec rm {} \; Just replace the 90 with the number of days old you want to delete. You can also pipe it into a log file: bash -c ‘date;find /path/to/files* [...]

Here is how you run a command as apache in centos without giving apache a valid shell. su -s /bin/sh apache -c “whoami”

Just run the following command from the command line: echo ‘d *’ | mail -N

Linux Cheat Sheet

For those of us, lucky enough to be Linux Sys admins, Network admin, App Programmer and Tech support, you sometimes need some help. I keep cheet sheets on hand for every app, network appliance, box, system or peice of junk just so I can get the job done without loosing my mind. In my repertoire [...]