with a colon : split into multiple fields and print out the contents of the 1th column field
How to specify multiple delimiters in awk at the same time
For example, now there is a file Some.log file content as follows
Grape (100g) 1980
raisins (500g) 1990
Plum (240g) 1997
Apricot (180g) nectarine
(200g) 2008
Now we want to split the Some.log file by the "Fruit Name (weight) year".
$ Awk-f ' [()] ' {print $ $ $ $ $} ' Some.log
Grape
I. Purpose
When using the CentOS6.3 version Linux system, found that the root directory (/) of the space is not sufficient, and other directory space has a lot of free, so this article is mainly for the existing space to adjust. First, let's look at the space allocation of the system:
[Plain] View plaincopyprint?
01.[root@centos-78/]# df-h
02.Filesystem Size Used avail use% mounted on
03./dev/mapper/vg_centos-lv_root
50G 14G 34G 30%/
05.tmpfs 1.9G 0 1.9G 0%/dev/shm
06./DEV/SDA1 485M 37
network, using the most commonly used 10GBASE-SR transceiver, the longest transmission distance of only 33 meters. After the transformation, the OM3 fiber +mpo connector is used to support the transmission distance of the 10GBASE-SR. and can be within 100 meters distance, support the future next generation 40G or even 100G ethernet. At present, switch manufacturers have introduced 100G Ethernet interface B
creation time, but will be set to zero as needed in the future when the write operation is first performed from the virtual machine. Thick provisioning 0 (tick provision eager zeroed)Create a thick disk that supports clustering functions, such as Fault tolerance. Allocate the required space for the virtual disk when you create it. In contrast to the thick provisioning delay of setting the 0 format, the data retained on the physical device is set to zero during the creation process. The amount o
http://wubx.net/AllInnoDB Engine Optimizationinnodb_buffer_pool_size (interview must ask)The main storage of heat data, according to page to store, page is the smallest unit, or even by paragraph to storeRecommended value: 50%-75% of physical memory recommended for private database serverIf other services are available, then the "principle of 2/8" is recommended:For example, 100G of data, at least 10% of active data, it is recommended that buffer
--memory-block-size=8k--memory-total-size=100g-- Memory-access-mode=seq RunTest 8K random allocation.Sysbench--threads=12--events=10000--test=memory--memory-block-size=8k--memory-total-size=100g-- Memory-access-mode=rnd Run File IO Test IO testing is primarily used to test the load performance of IO. The main test option is--file-test-mode. There are also parameters to be concerned with--file-block-size 、--
the source code package you will not have to download it)# tar ZXVF mysql-5.5.38.tar.gz# CD mysql-5.5.38# cmake-dcmake_install_prefix=/usr/local/mysql-dsysconfdir=/etc-dmysql_datadir=/data/mysql-dmysql_tcp_port=3306 -dmysql_unix_addr=/tmp/mysqld.sock-ddefault_charset=utf8-ddefault_collation=utf8_general_ci-dmysql_user=mysql# Gmake# gmake Install5. set up the MYSQL server configuration file:# Cd/usr/local/mysql# CP./support-files/my-huge.cnf/etc/my.cnf# VI/ETC/MY.CNF(Add or modify options in di
;my.ini
echo [MySQL] >>my.ini
echo Default-character-set=utf8 >>my.ini
echo [Mysqld] >>my.ini
Echo port=3306 >>my.ini
REM The following two sentences can be modified according to the actual situation
Echo Basedir=%realpath%/>>my.ini
Echo Datadir=%realpath%/data/>>my.ini
echo Default-character-set=utf8 >>my.ini
echo Default-storage-engine=innodb >>my.ini
Echo max_connections=100 >>my.ini
Echo query_cache_size=8m >>my.ini
Echo table_cache=256 >>my.ini
Echo tm
Tags: style color io for AR data CTI HTML log1 in-Shell for loop cleanup Remove the data by connecting MONGO each time echo "Begin ..." >>/root/time.log;echo $ (date +%y-%m-%d-%h:%m:%s) >>/root/time.log;for (i=1;i 2 MONGO shell in for loop cleanup Connect only once MONGO, in MONGO shell for loop cleanup [Email protected] ~]# more T.shecho "Begin ..." >>/root/t.log;echo $ (date +%y-%m-%d-%h:%m:%s) >>/root/t.log ;/usr/local/mongodb/bin/mongo 127.0.0.1:37017/test-uadmin-padmin T.js;echo $ (date +%y
, while adjusting to a separate table space, To solve this problem once and for all.First, add a 100G disk on the virtual machine, then partition the disk, then mount the disk to the/zabbixdb directory, back up the database, migrate the database storage location to the Zabbixdb directory, and then modify the database as a standalone tablespace mode, and then restore the database;1. Add disk and format disk[Email protected]_server/]# fdisk/dev/sdb[[ema
Tags: style http color io os using AR for filePrefaceWhether it is a blog park or CSDN, see a lot of friends on the database understanding, understanding or not break through a bottleneck, and this bottleneck is often just a layer of window paper, over which you will see a new world.04, 05 When doing the project, with SQL Server 2000, the core table (most of the key functions used frequently every time to use) to reach 8 million data volume, long ago looked up some related tables, some reached m
backup;
Disk utilization is 50%, that is, 2 100G of disk composition RAID1 can only provide 100G of free space.
RAID-5 Characteristics:
The use of parity check, high reliability
The disk checksum is hashed to a different disk, increasing the read and write rate.
Data cannot be restored only if two disks are lost at the same time
At least three hard drives and the hard disk
edited text file into the *nix, each line is more than a ^m.Solve:1) write the script again under Linux;2) vi:%s/r//g:%s/^m//g (^m input with ctrl+v,ctrl+m)Attached: sh-x script file name, you can step into and echo the results, to help troubleshoot complex scripting problems.2.crontab output Result control problem: /var/spool/clientmqueue directory takes up more than 100G Cause: cron The program executed in the output content, the output will
, compaction, will lead to cluster response time fluctuation is very large, region number too much not only to bring trouble to the management, and even will cause some Hbase bug 。 The average 512M or less is a small region. The large region is less suitable for frequent split and compaction, because doing a compact and split will result in a longer pause and a very large impact on the read and write performance of the application.In addition, the large region means that larger storefile,compact
Tags: linu/etc/body Select Ignore app backup and PNGLinux server to add a new hard disk, you can directly format the disk can be used, such as mount in the/usr/local directory, but there is a drawback, that is, if this disk full, the subsequent want to expand, can not continue to mount this/usr/local mount point, There is a certain amount of trouble with scaling, so we recommend using LVM to support dynamically expanding disks. Detailed how to do this is described below.1, to view the new disk,
Linux command line shortcut keysShortcut keys: Tab Auto-complete path directory name, +l (lowercase) Clear screen, CTRL ++ + +e (lowercase) to command line end shortcut: Ctrl+k Delete/ cut the contents of the cursor to the end of the line shortcut key: Ctrl+u Delete/ cut the cursor position to the beginning of the content shortcut: Ctrl +y paste shortcut key: Ctrl+r Find history command shortcut: Ctrl+ left and rig
in the variable "open-files-limit" in# section [mysqld_safe]table_cache=256# Maximum size for internal (in-memory) temporary tables. If a table# grows larger than this value, it is automatically converted to disk# based table This limitation is for a single table. There can be many# of them.tmp_table_size=15M# How many threads we should keep in a cache for reuse. When a client# disconnects, the client's threads are put in the cache if there aren't# more than thread_cache_size threads from befor
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.