protected] ~]# Last-n 5Kiosk pts/0:0 Wed Nov 9 19:46 still logged inKiosk pts/0:0 Wed Nov 9 18:57-19:46 (00:48)kiosk:0:0 Wed Nov 9 18:57 still logged inReboot system boot 3.10.0-327.el7.x Thu Nov 10 02:56-19:59 ( -6:-57)kiosk:0:0 Wed Nov 9 17:55-17:55 (00:00)Wtmp begins Wed Sep 28 00:38:05 2016[[email protected] ~]# Last-n 5 | awk ' {print $ ' \ t ' $} 'kiosk:0kiosk:0kiosk:0Reboot bootkiosk:0$ A represents a whole row of dataBuilt-in variablesNF total number of fields per row ($)NR current awk
Priority of the thread:The priority of the thread is divided into three types, namely:1-min_priority10-max_priority5-norm_priorityIf nothing is set the default value is 5The priority of a thread can affect the order in which threads are executed, and of course this refers to a possible impact that does not necessarily affect it. In the default state (for example, the main thread) its default value is 5Specific Code Demo:Package Com.yeqc.thread;class ThRun implements runnable{@Overridepublic void
) {}//return; to } + - voiddoWork () {...} the}Implementation principleThe Countdownlatch is based on the AQS implementation, using the synchronization state of Aqs to represent the counter count.Let's take a look at the implementation of Countdownlatch's inner class Syns:1 Private Static Final classSyncextendsAbstractqueuedsynchronizer {2 Private Static Final LongSerialversionuid = 4982264981922014374L;3 4Sync (intcount) {5SetState (coun
.
1, CacheItem
The CacheItem type is used to represent a separate cache entry, the source code is shown below, each field is clearly understandable, and a slightly longer note has been annotated in Chinese.
1//cacheitemisanindividualcacheitem 2//parameterdata Containstheuser-setvalueinthecache. 3typecacheitemstruct{4sync. Rwmutex 5 6//theitem ' Skey. 7keyinterface{} 8//theitem ' Sdata. 9datainterface{}10//"Time to live after not being accessed" 11 /
Cut action and usage:Cut [-option] file nameCut-remove sections from all line of filesCut a piece of content from each line of a file-D: Specify the field delimiter, the default delimiter is a space-F: Specify the fields to display-f1,3 showing 1 and 3 segments-f1-3 Show from 1 to 3 segments, i.e.[Email protected] test]# cut-d:-f1,3/etc/passwdroot:0Bin:1Daemon:2Adm:3Lp:4Sync:5Shutdown:6[Email protected] test]# cut-d:-f1-3/etc/passwdroot:x:0Bin:x:1Daem
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.