Back to Linux

Linux

Basic admin command

Author

Anjani Phuyal

Date

May 26, 2014

Category

Linux

Read Time

3 min read

Create User

useradd -m username

crontab edit

env EDITOR=nano crontab -e

To backup using TAR

  • tar -zcvf file_27_07_2012.tar.gz /var/www/

To Restore tar backup

Remote file copy using scp

Find directory in linux

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 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
#Linux#Admin#Commands