Linux problem accumulation __linux

Source: Internet
Author: User

There was a problem today, the Tomcat restart on Linux failed, because it was a bit of a surprise to have to reboot the server and not do any extra commands.

Later ready to upgrade Tomcat, upload installation package when found that the storage space is not enough to find the Linux server storage space has been basically no ... To find the problem is good to do, is to delete the chant.

To view the disk Space command: DF-LH


Today's newly learned Linux command:

View Indicator usage: top

Reboot: Shutdown-r now or reboot

To view the contents of a file:

Tailf/home/.../task.log: Show all current time to start updating content

Tail-n +123/home/. /task.log: Displays content starting with 123 lines

Sed-n ' 123,456p '/home/. /task.log: Displays the contents of the search file from 123 lines to 456 lines:
grep-n [']keyvalue[']/home/. /task.log: Search KeyValue
Grep-n +12345 [']keyvalue[']/home/. /task.log: Search keyvalue from 12345 lines

Exit current command: CTRL + C

viewing boot ports: netstat-tln


Tail-n-A digital file name that represents the last few lines of the view file, such as viewing the last 5 lines of specialvariable.sh, Tail-n-5 specialvariable.sh, as shown below














Tail-n + numeric file name to view a row of the file to the last line, such as viewing the 3rd line of Specialvariable.sh to the last line, Tail-n +3 specialvariable.sh, as shown below















Head-n a digital file name to view the contents of the first few lines of the file, such as viewing the first 3 lines of specialvariable.sh, Head-n 3 specialvariable.sh, as shown below







Split file

Split-b 10k Date.file-d-a 3 split_file
Show file list: ls























































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.