Last active
March 8, 2024 10:38
-
-
Save sorokadima/58c99214df8f191d6194ebc86a969af7 to your computer and use it in GitHub Desktop.
Bash cheat sheet (Run command by time interval, Find file on disk, Script output to file)
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
# Run command by time interval | |
watch -n 60 index.sh | |
# Find file on disk | |
find / -name "myfile" | |
find / -name "%myfile%" | |
# Script output to file | |
ls > log.txt | |
ls >> log.txt # don't rewrite file | |
# Run service | |
sudo service start mysql | |
# or | |
sudo systemctl start mysql | |
# Rules | |
sudo chown -R dima:dima ./my | |
sudo chmod -R 777 ./my |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kill process
check and kill spring process