Skip to content
Joey Kleiner edited this page Jan 17, 2023 · 32 revisions
# see jobs running 
jobs

# The fg command switches a job running in the background into the foreground
fg nano HYDR.py

# change permissions on all files in a directory (Required for HSP2 work):
jkleiner@deq3:/opt/model/HSPsquared$ sudo chgrp modelers HSP2/* -R
jkleiner@deq3:/opt/model/HSPsquared$ sudo chmod g+w HSP2/* -R

# change file owner and group information
chown

# Search shell command history
history | grep "STRING_TO_SEARCH_HERE'

cron:

# cron: https://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/#:~:text=Cron%20allows%20Linux%20and%20Unix,%2Ftmp%2F%20directories%20and%20more.
# the cron service (daemon) runs in the background and constantly checks the /etc/crontab file, and /etc/cron.*/ directories

ssh -p '311' 'jkleiner@deq1.bse.vt.edu'
sudo su -
cd /etc/cron.daily
cat deq-drought
# contains the shebang: #!/bin/sh

# run the cron script:
#./deq-drought
nohup ./deq-drought


cat /etc/crontab
# It runs all scripts in /etc/cron.daily/ once a day

Fixing git permissions on deq1:

Also, here is the command to make sure that we both can do stuff in there once you are back in sudo: 
sudo chgrp modelers .git
sudo chgrp modelers .git/* -R
sudo chmod g+w .git/* -R

Clone this wiki locally