Basic admin command
Author
Anjani Phuyal
Date
May 26, 2014
Category
Linux
Read Time
3 min read
Create User
useradd -m usernamecrontab edit
env EDITOR=nano crontab -eTo backup using TAR
- tar -zcvf file_27_07_2012.tar.gz /var/www/
To Restore tar backup
Remote file copy using scp
- scp localfile root@remoteserver:/BACKUP eg: scp tomcat.tar [email protected]:/BACKUP
Find directory in linux
find / -name 'httpdocs' -type dFind 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 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 OKor to restart tomcat
shutdown.sh && startup.sh#Linux#Admin#Commands