Last active
July 17, 2017 14:10
-
-
Save uladkasach/c25a6b3f71365575aea8d390773be163 to your computer and use it in GitHub Desktop.
useful regex and unix commands
This file contains 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
[^\\\\]console.log | |
## find string which exists in any file recursivly throughout directory | |
grep -r -o -i "string" * | |
## find files w/ names containing string | |
find . -type f -name "*string*" | |
## detect if script is being run from terminal or another script | |
if [[ -t 1 ]]; then | |
echo "Terminal" | |
else | |
echo "Not-a-terminal" | |
fi | |
remove user's crontab file `sudo crontab -r -u datim4u_backup_manager` | |
sudo apt-get install -y debconf-utils | |
Then find debconf related to MySQL: | |
sudo debconf-get-selections | grep mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment