Skip to content

Instantly share code, notes, and snippets.

@sorokadima
Last active March 8, 2024 10:38
Show Gist options
  • Save sorokadima/58c99214df8f191d6194ebc86a969af7 to your computer and use it in GitHub Desktop.
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)
# 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
@sorokadima
Copy link
Author

kill process

check and kill spring process

ps aux | grep spring
pkill -9 -f spring
# or
pkill -f spring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment