Last active
October 4, 2018 08:17
-
-
Save bubbobne/5d140393e33975b8a28e51b90383ed98 to your computer and use it in GitHub Desktop.
bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //rename | |
| rename 's/pattern/new_string/' <files> | |
| //upper-to-lower | |
| for i in *; do mv $i `echo $i | tr [:upper:] [:lower:]`; done | |
| //get apache user name | |
| APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\ -f1` | |
| //set permission | |
| sudo chmod g+rw "$APACHEUSER allow delete,write,append,file_inherit,directory_inherit" ./logs | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment