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