Skip to content

Instantly share code, notes, and snippets.

@thedoc31
Created April 4, 2016 23:24
Show Gist options
  • Save thedoc31/a592b3c988520646902731388aa52393 to your computer and use it in GitHub Desktop.
Save thedoc31/a592b3c988520646902731388aa52393 to your computer and use it in GitHub Desktop.
Function for .bashrc which will bundle all new CSR files/folders under /etc/httpd/conf.d that have a date of now-1 into a tar file into a home folder. Tag filename with today's date.
bundlecsr() {
today=`date +%Y-%m-%d`
find /etc/httpd/conf.d/* -maxdepth 0 -mtime -1 | tar cvf /home/<username>/csrs_"$today".tar -T -
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment