The TR command reads data from the standard input device and returns the data to the standard output device after string translation.
Cat filename | tr u n: used to replace the U in the filename file with N on the screen, but not in the actual file.
Cat filename | tr-d abc deletes and displays all the characters A, B, and C in the filename content on the screen.
Cat filename | tr [: lower:] [: Upper:] converts all lowercase letters in the file content to uppercase letters.
The replacement symbols similar to [: lower:] are as follows:
[: Alnum:] indicates all letters and numbers.
[: Alpha:] indicates all letters
[: Blank:] indicates all spaces
[: Digit:] indicates all numbers
[: Graph:] indicates all printable characters, excluding spaces.
[: Print:] indicates all printable characters, including Spaces
Uname-a print all system information
Uname-S print kernel name
Uname-N print network node Host Name
Uname-R: Print kernel Mail version number
Uname-help for help
You can also view the system version by using the following methods:
CAT/proc/version
CAT/etc/RedHat-release
CAT/etc/issue
Chkconfig is frequently used in command line operations. It allows you to conveniently set the services started at the running level of each system. You can easily manage your startup services.
To list the startup status of all services in the system:
# Chkconfig-list
To list the mysqld service settings:
# Chkconfig-list mysqld
Set mysqld to be used for startup at levels 3 and 5:
# Chkconfig-level 35 mysqld on
-Level 35 indicates that the operation is only executed at levels 3 and 5.
On indicates start, off indicates close
Set mysqld to on:
# Chkconfig mysqld on
"Each level" includes 2, 3, 4, and 5 levels
Level 0: Shutdown
Level 1: Single User Mode
Level 2: multi-user command line mode without network connection
Level 3: multi-user command line mode with network connection
Level 4: unavailable
Level 5: multi-user mode with graphic interface
Level 6: restart
How to add a service:
First, the Service script must be stored in the/etc/INI. d/directory;
Second, you need to use chkconfig-add servicename to add this service to the chkconfig tool service list. In this case, the service will be stored in/etc/rc. d/rcN. d.
Finally, you can modify the default startup level of the service as instructed above.
Delete A service:
# Chkconfig-del servicename