Archives 2015

Linux Process management command

Process management command

init: Process number is 1

Classification of processes:
     the processes associated with the terminal
     Terminal independent process

1.process state:

     D: Non interrupted sleep
     R: Run or ready
     S: Interrupted sleep
     T: Stop it
     Z:  Zombie state

     <:  High priority process
     N: Low priority process
     +: Processes in the foreground process group
     l ...

Continue reading

Linux software is not installed in the default directory

The software is not installed in the default directory of the solution

1.Modify the PATH environment variable to be able to identify the binary file path for this program:

   modified /etc/profile
  In the /etc/profile.d/ directory, create a file with names ending in .sh suffix, which write the  "export PATH=$PATH:/path ...

Continue reading

Linux File compression and Archive command

File compression and Archive command summary

compressed format: gz, bz2, xz, Z, zip Compression algorithm: the algorithm is different, the compression ratio will be different;


gzip: .gz 
  gzip /PATH/TO/SOMEFILE: gzip will delete the original file after the completion of the compression
  gzip -d: decompression
       -#: 1-9, specify the compression ratio, the default ...

Continue reading

Linux File Find command

File Find command


Non-real-time, fuzzy matching, lookup is performed according to the system-wide file database;
# updatedb, Manually generated file database (fast)

2. find: Find PathFinder standard look to a future process of operation

Real-time, accurate, supports many search criteria, traversing all the files in the specified directory lookup completed, slow;

Search Path: The ...

Continue reading

linux Sed (stream editor)

Sed (stream editor)

Stream EDitor sed: line editor
The default sed: mode space does not edit the original file, only the data in the mode space to do processing; and then, after the end of the processing, the pattern space is printed to the screen

sed [options]'AddressCommand'file file...

-n: silent mode, the default ...

Continue reading

linux vim editor note

vim editor

1. open the file

# vim /path/to/somefile
      vim + #: Open the file, and positioned at the first # line
      vim +: Open File, navigate to the last row
      vim +/PATTERN: Open File, navigate to the line the first time to the line matching PATTERN

2. close the file

1) line mode close the file
:q ...

Continue reading

Linux Vim commands Collection

Vim commands Collection

Command History

 To: and / beginning commands have history, you can type the first: or / and then press the down arrow to select a command history.

Start vim

Enter the following command in the command line window to

    [root@mylab]# vim

vim filename open vim or create a file named filename

    [root@mylab ...

Continue reading

Linux Redis 3.0.5 installation and configuration

Redis 3.0.5 on the Linux installation and configuration

1. Download the installation package

[root@mylab]# wget

2. Compilation and installation

[root@mylab]# yum install gcc tcl
[root@mylab]# tar -zxf redis-3.0.5.tar.gz
[root@mylab]# cd redis-3.0.5
[root@mylab ...

Continue reading

linux centos7 switch graphic mode and text mode

centos7 switch graphic mode and text mode

In the graphic mode using ctrl + alt + F2 to switch to a text mode.
text mode press ctrl + alt + F2 to switch back to the graphic mode.
Enter the command init 3 to switch to text mode.
Enter the command init 5 to switch to graphic mode.

If ...

Continue reading

linux IO redirection

linux IO redirection

The default output device: standard output, STDOUT, 1
Default input device: standard input, STDIN, 0
Standard error output: STDERR, 2

Linux I/O redirection:

>: Override Output
eg. [root@mylab]# ls /var > /tmp/var2.out
>>: Append output
set -C: already prohibits the use of file redirection coverage
Force overwrite output ...

Continue reading

Monthly archives

Next year