Advanced Linux Commands

Source: Internet
Author: User

1) Replace all files in the file::%s#abc#123#g (if there is # in the file, available/replace,:%s/abc/123/g)--note: replace ABC with 123 (or:%s/str1/str2/g Replace all str1 in the file with str2) 2) Local replacement in file:  : 20,30s#abc#123 (if there is # in the file, available/replace,:%s/abc/123/g)--note: Replace 20 lines to 30 in line with ABC 123 3) View the Linux version:  A. Enter "Uname-a" to display information about your computer and the operating system. B. Enter "Cat/proc/version" to indicate the kernel version that is running. C. Enter "Cat/etc/issue", which shows the release version information D.lsb_release-a (for all Linux, including Redhat, SuSE, Debian and other distributions, but installs LSB under Debian) 4) count the number of occurrences of the string:  Grep-o Objstr Filename|wc-l 5) Kill all related processes:  Kill-9 ' Ps-ef | grep Agentmain | Grep-v "grep" | Grep-v "grep" | awk ' {print $} ' continues to update ...

Advanced Linux Commands

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.