Tag archives: command
RSS feed of command
1.Enable a service to start automatically
1) chkconfig --level 3 SERVICENAME on (old command)
2) systemctl enable SERVICENAME.service (new command)
2.Disable a service to start automatically
1) chkconfig --level 3 SERVICENAME off (old command)
2) systemctl disable SERVICENAME.service (new command)
3.View service status(old command and old command)
1) service ...
RPM(RedHat Package Manager)
Binary package (Binary) as well as the source code package (Source) two. The binary package can be installed directly on the computer, and the source code package will be compiled and installed automatically by the RPM. Source code packages often use src.rpm as a suffix.
1.Common command combination：
client1: 192.168.4.11 Linux Host
server1: 192.168.4.33 Linux Host
client server Generate key(Public key and Private key), copy the Public key to server1
1.client1 Generate key
[root@client1 ~]# ssh-keygen -b 1024 -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root ...
Process management command
init: Process number is 1
Classification of processes：
the processes associated with the terminal
Terminal independent process
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
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 /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 ...
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 ...
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 ...
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
Vim commands Collection
To: and / beginning commands have history, you can type the first: or / and then press the down arrow to select a command history.
Enter the following command in the command line window to
vim filename open vim or create a file named filename
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 ...