Linux Command Encapsulation notes

Source: Internet
Author: User

1, Linux system has many commands, regardless of tomcat,nginx,docker and other applications deployed to the Linux server. Regardless of the start, stop, view log or kill process to the corresponding directory or through the pipe symbol splicing command to achieve the effect. This is time consuming and requires remembering a lot of commands. Here's how to encapsulate some simple and easy-to-remember commands

2. First enter the Tomcat directory

Create the folder, put the script command in the folder, note the script command to give permissions, I generally directly chmod 777 iread.sh, that is, give the file all permissions. Here I am in the server above the main encapsulation of some engineering restart, stop, view the log command

3. Then go to the User directory and locate the. bash_profile file if you do not create one yourself.

This file is usually made into a hidden file because it is generally not necessary to change it. At the same time, after writing, you need to execute the source. Bash_profile command, let the command take effect, and then you can execute your packaged commands under the SNS user.

Linux Command Encapsulation notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.