Linux Common Command collation

Source: Internet
Author: User

1. How to add a user to the Sudoer list:

chmod +w /etc/echo'mirandam all= (All) nopasswd:all' >>/etc/chmod -w /etc/

2. For loop Example:

    for in $ (find ' *.xml '-do    Done

3. String segmentation:

INPUT == 'echocut'_'2echo  //

4. Replace the regular expression of the string:

Echo Caster_3. 1. 1_rc_build.svn.150718_java. Tar sed ' s/_rc_build/.svn/. [0-9]*_'

5. Wget Password and authentication:

wget --http-user=user--http-passwd=secret http://

6. Restart the Network service:

7. Install Subversion:

Yum Install Subversion MOD_DAV_SVN

8. Shell script Parameters Get:

$//Command name
$//First parameter
$ A//second parameter
$ A//third parameter, and so on
$#//number of all parameters
[Email protected]//list of all parameters

9. Obtain the Linux/unix core version number:

uname -// or (more information will be printed):cat

Operating level of Linux:

RunLevel 0: Shutdown, do not set as default run level
RunLevel 1: Single-user mode
RunLevel 2: Multi-user mode with no NFS
RunLevel 3: Full multi-user mode, same as 2 if no network connection
RunLevel 4: Unused
RunLevel 5: Graphical user mode (RunLevel 3 + X Window System "graphical user Interface").
RunLevel 6: Reboot, do not set as default run level

11. Dynamically view the content at the end of the text file:

tail -f/etc/text. file

12, unzip the BZ2 format compressed file:

Bzcat gcc-4.1. 2. Tar Tar //  targcc-4.1. 2. tar. bz2

13. Check the byte order of the platform (if you don't know what the byte order is: http://en.wikipedia.org/wiki/Endianness):

Echo Head cut -f2-d""cut -c6

14. Retrieve the number of occurrences of a word in a file:

:%s/pattern//gn

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.