useradd -m username
crontab edit
env EDITOR=nano crontab -e
To backup using TAR
- tar -zcvf file_27_07_2012.tar.gz /var/www/
- scp localfile root@remoteserver:/BACKUP eg: scp tomcat.tar [email protected]:/BACKUP
find / -name 'httpdocs' -type d
Find Files
find -name met*
The above command would start searching for the files that begin with the letters 'met' within the current directory and the directories that are present within the current directory. Since the directory is not specified as the the second parameter, Linux defaults to using the current directory as the one to start the search in.
Run second command after first command executes successfully
to_be_checked_and_alerted_script.sh && echo OK
or to restart tomcat
shutdown.sh && startup.sh