Linux Directive Daquan (2)

zhaozj2021-02-11  205

Linux Directive Daquan (2)

Name: AT Usage Permissions: All users use methods: at -v [-q queue] [-f file] [-mldbv] Time Description: AT allows users to specify a program or instructions at Time's specific time, Time's format is HH: mm in HH hours, mm is minutes, and you can also specify AM, PM, Midnight, Noon, Teatime, etc. If you want to specify the time in more than a day, you can use mmddyy or mm / dd / yy format, where mm is minute, DD is the day, yy refers to the year. In addition, the user can even use the NOW time interval to elastic designation time, where the time interval can be minutes, hours, days, weeks, and the user can specify Today or Tomorrow to represent today or tomorrow. When the time is specified and press Enter, the AT will enter the conversation mode and ask for input instructions or programs. When you press CTRL D, press Ctrl D to complete all the actions, as for the result of the execution, will be sent back to your account . Putting: -v: Print Publish No. -Q: Use the specified column (Queue) to store, the data of the AT is stored in the so-called queue, and the user can use multiple queue at the same time, and the Queue number is A , B, C ... Z, A, B, ... Z Total 52 - M: Even if the program / instruction is not completed, there is no output result, but also send a letter to the user -f file: read in advance Good command file. Users do not have to use the conversation mode to enter, first write all the specified first to the file once again read -L: List all the specified (the user can also use ATQ directly without AT -L) -D : Delete the specified (the user can use ATRM directly without using AT -D) -V: List all the specified examples that have been completed but have not been removed: 5 pm after three days of execution / bin / ls: AT 5PM 3 days / bin / ls three weeks later 5 pm on 5 pm / BIN / LS: AT 5PM 2 Weeks / Bin / LS Tomorrow 17:20 Execution / bin / date: at 17:20 Tomorrow / BIN / date 1999 The last day of the last day printed the end of world! At 23:59 12/31/1999 echo the end of world! Name: CAL Usage Permissions: All users use methods: cal [-mjy] [Month ]]]]] Description: Displays the calendar. If there is only one parameter, it represents the year (1-9999), showing the annual calendar. It must be written in the year: `` Cal 89 / will not show the calendar of 1989. Use two parameters, indicating the month and year. If there is no parameter, this month's calendar is displayed. September 3rd on September 1752, the Western calendar, because most countries used a new calendar, 10 days of removal, so the monthly calendar of the month is somewhat different. It was before this.匡  -M: Displayed on Monday for weekly first day. -J: Displayed by Kaisa, that is, the number of days from January 1 is displayed. -y: Show this year calendar. Example: CAL: Shows the monthly calendar of this month.

[root @ mylinux / root] # Date Tue aug 15 08:00:18 CST 2000 [root @ mylinux / root] # Cal August 2000 Su Mo Tu We TH fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 [root @ mylinux / root] # CAL 2001: Show AD 2001 calendar. [root @ mylinux / root] # CAL 2001 2001 January February March Su Mo Tu We TH fr SU Mo Tu We TH fr SU Mo Tu We TH fr sa 1 2 3 4 5 6 1 2 3 1 2 3 7 8 9 10 11 12 13 4 5 6 7 8 9 10 4 5 6 7 8 9 10 14 15 16 14 16 17 11 12 13 14 15 16 17 21 22 23 24 25 26 27 18 19 20 21 22 23 24 28 29 29 30 31 25 26 27 2825 26 27 28 29 30 31 April May June Su Mo Tu We TH fr SU Mo Tu We TH fr sa 1 2 3 4 5 6 7 1 2 3 4 5 1 2 8 9 10 11 12 13 14 6 7 8 9 10 11 12 3 4 5 6 7 8 9 15 16 17 18 19 20 21 13 14 15 16 17 18 19 10 11 12 13 14 25 26 27 28 20 21 22 23 24 222 23 29 30 27 28 29 30 31 24 25 26 27 28 29 30 July August September Su Mo Tu We TH fr SA Su Mo Tu WE TH fr Sa 1 2 3 4 5 6 7 1 2 3 4 1 8 9 10 11 12 13 14 5 6 7 8 9 10 11 2 3 4 5 6 7 8 15 16 17 18 19 20 21 12 13 14 15 16 14 15 222 23 24 25 26 27 28 19 20 21 22 23 24 25 16 17 18 19 20 21 22 29 30 31 26 27 28 29 30 31 2 3 24 25 26 27 28 29 30 October November December Su Mo Tu We TH fr SU Mo Tu We TH fr SU Mo Tu We THFR SA 1 2 3 4 5 6 1 2 3 1 7 8 9 10 11 12 13 4 5 6 7 8 9 10 2 3 4 5 6 7 8 14 15 16 14 15 16 17 9 10 11 12 13 14 15 21 22 23 24 25 26 27 18 19 20 21 22 23 24 16 17 18 19 20 21 25 26 27 28 29 30 23 24 25 26 27 28 29 30 31 [root @ mylinux / root] # CAL 5 2001: Show AD 2001 May Calendar.

[root @ mylinux / root] # CAL 5 2001 May 2001 Su Mo Tu We TH fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 [root @ mylinux / root] # Cal -m: The first day of Monday is a weekly way to show this month. [root @ mylinux / root] # Cal -m August 2000 Mo Tu We TH fr SU 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 [root @ mylinux / root] # Cal -jy: The number of days from January 1 show this year's calendar. [root @

MYLINUX / ROOT] # Cal -Jy 2000 January February Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat 1 32 33 34 35 36 2 3 4 5 6 7 8 37 38 39 40 41 42 43 9 10 11 12 13 14 15 44 45 617 18 19 20 21 22 51 52 53 54 55 56 57 23 24 25 26 27 28 29 58 59 60 30 31 March April Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri SAT 61 62 67 64 69 70 71 93 94 95 96 97 98 99 72 73 74 75 76 77 78 100 101 102 103 104 105 106 79 80 81 82 83 84 85 107 108 109 110 111 112 113 86 87 88 89 90 91 114 115 116 117 118 119 120 121 May June Sun Mon Tue Wed Thu fri sat 122 123 124 125 128 129 130 131 132 133 134 156 157 158 159 160 161 162 135 136 137 138 165 166 167 168 169 142 143 144 145 146 147 148 174 171 172 173 174 175 176 149 150 151 152 177 178 179 180 181 182 July August Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat 183 214 215 216 217 218 184 185 186 187 188 189 190 219 220 221 222 223 224 2 25 191 192 197 230 231 232 198 29 2002020202202202206 207 208 209 205 206 207 208 209 210 211 240 241 242 243 244 212 213 September October Sun Mon Tue WED THU Fri Sat Sun Mon Tue Wed Thu Fri Sat 245 246 275 276 277 278 279 280 282 251 252 253 282 283 284 255 256 257 258 259 260 289 290 291 292 293 294 295 261 262 263 264 265 266 267 29 29 2922268 269 274 302 272 273 274 303 304 305 November December Sun Mon Tue Wed Thu fri sat 3037 308 309 336 337 310 311 312 313 314 315 316 338 339 343 344 317 318 319 320 321 322 323 345 346 347 348 349 350 351 324 325 326 327 328 329 330 352 353 354 355 356 357

358 331 335 359 360 361 362 363 364 365 366 [root @ mylinux / root] # Name: crontab Usage Permissions: All users use methods: crontab [-u user] filecrontab [-u user] {-l | -r | -e} Description: crontab is used to make users at a fixed time or fixed interval executable, in other words, that is, a similar user's schedule. -u user refers to the schedule that sets the specified user. This premise is that you have to have its permissions (such as root) to specify the schedule of others. If you don't use -u user, it means to set your own schedule. Number of meals: -e: Perform a text editor to set a time schedule, the constant text editor is VI, if you want to use the other text editor, first set the Visual environment variable to specify the use of that text editor. (For example, SETENV Visual Joe) -r: Delete the current Turkey -L: Lists the current schedule meter format as follows: F1 F2 F3 F4 F5 program where F1 is a minute, F2 represents hours, F3 Represents the day in one month, F4 means the month, F5 represents the first few days in the week. Program represents the program to be executed. When F1 is *, the Program is executed every minute, and the F2 is * indicates that the program is executed per hour, and the remaining classes have been applied to the first time to be AB, which is executed from the first minutes to the third time, F2 is When AB is executed from paragraphs A to B, the remaining classes are pushed to * / n when the f1 is * / N, indicating that each time interval is executed once, and F2 is * / n to execute each time time interval, the remaining classes When F1 is A, B, C, ... is shown in paragraph A, B, C, ... minutes to perform, F2 is A, B, C, ... indicated first, b, c ... In an hour, the remaining class push users can also store all settings first in the file file, and set the time schedule in the way of crontab file. Example: Perhab / bin / ls: 0 7 * * * / bin / ls per hour per hour per hour, per day to 12 o'clock, every 20 minutes per day / usr / bin / backup: 0 6-12 / 3 * 12 * / usr / bin / backup Monday to Friday 5:00 pm alex@domain.name: 0 17 * * 1-5 mail -s "hi" alex@domain.name / dev / null 2> & 1. Name: Date Usage Permissions: All Users User Way: Date [-u] [-d Datestr] [-S DateStr] [--UTC] [--Universal] [--DATE = DATESTR] [--Set = DateStr ] [--HELP] [--Version] [ Format] [MMDDHMM [[[[CC] YY] [. SS]] Description: Date can be used to display or set the date and time of the system, in display aspect & #

XFF0C; user can set the format designed to display, the format is set to a plurality of plus numbers, where the available tag list is as follows: Time:%: Print% N: Next VIP% T: Jumping % H: Hours (00..23)% i: Hours (01..12)% K: Hours (0..23)% L: Hours (1..12)% M: Minutes (00..59) % P: Display Local AM or PM% R: Direct Display Time (12 hours, the format is HH: mm: SS [AP] M)% s: From January 1, 1970 00:00 UTC to now Seconds% s: Second (00..61)% T: Direct display time (24 hours)% x: equivalent to% h:% m:% s% z: display time zone date:% a: Week (Sun..SAT)% A: Sunday..saturday% B: Month (JAN..DEC)% B: month (January..Dec)% C: Direct display date and time% d: Japan ( 01..31)% D: Direct display date (mm / dd / yy)% H: same% b% J: The first few days in the year (001..366)% M: Month (01..12) % U: The first day of the year (00..53) (in Sunday is the first day of the week)% W: The first day of the week (0..6)% w: one year The next few weeks (00..53) (in the case of Monday for a week)% x: Direct display Date (mm / dd / yy)% Y: The last two digits of the year (00.99)% Y: Complete If the year (0000..9999) is not starting with the plus sign, it means to set the time, and the time format is mmddhhmm [[cc] yy] [. Ss], where MM is month, DD is the day, HH is hour MM is minutes, CC is the first two digits of the year, yy is two digits after the year, SS is the number of seconds: -d datestr: Display time (non-system time) set in DateStr - HELP: Show Auxiliary message -s dateStr: Set the time to date in DateStr to display the current Greenwich Time --Version: Display version number: Show time jump, then display the current date: Date % T% N% D shows the month and the number of days: Date % B% D Display Date and Setting Time (12:34:56): Date --Date 12:34:56 Note: When you don't want to have meaningless 0 (for example, 1999/03/07) Then, you can insert-symbols in the mark, for example, Date % - H:% - M:% - S will remove the meaningless 0 in the middle of the time, like the original 08:09:04 changed to 8 : 9: 4. In addition, only the permissions (such as ROOT) can set the system time. When you change the system time with the root identity, please write the system time in CMOS in CLOCK -W so that the system time will continue to hold the latest correct value when it is rebooted next time. Name: SLEEP Usage Permissions: All users use mode: sleep [--help] [--version] Number [SMHD] Description: SLEEP can be used to delay the current action to delay a period of time parameter description: --help: Display auxiliary message - -Version: The version number Number: Time length, the back can be connected to S, M, H or D in seconds, m for minutes, H is hour, D is a daily number of days: displaying the current time delay 1 minute, then display again Time: Date; Sleep 1M; Date Name: Time Usage Permissions: All User Ways & # Xff

1A; TIME [OPTIONS] Command [Arguments] Description: The purpose of the TIME instruction is to measure the time and system resources such as the measurement of specific instructions. For example, CPU time, memory, input and the like, and the like. Special attention is required is that some information can not be displayed on Linux. This is because the allocation of some resources on Linux is not the same as the TIME instruction, so that the TIME instruction cannot be obtained. Set the result output file to the meter -o or --output = file setting. This option writes the output of the Time to the specified file. If the file already exists, the system will override its content. -A or --Append cooperation -o use, will write the result to the end of the file without overwriting the original content. -f format or - format = format Sets the display mode with the Format string. When this option is not set, you will use the system preset format. However, you can use the environment variable time to set this format, so you don't have to set it once every login system. In general setting, you can use / t to indicate the jump, or use / n to refer to the wrap. Each material uses% as a preamble. If you want to use a percentage symbol in the string, use it. (The people who have learned C language will feel very familiar) Time instructions can be displayed. There are four major items, respectively: Time Resources Memory Resources IO Resources Command Info Detailed content is as follows: Time Resources E Execute the time spending the instruction, The format is: [Hour]: minute: second. Note that this number does not represent the actual CPU time. e Execute the time spending the instruction, the unit is second. Note that this number does not represent the actual CPU time. The time spent on the core mode during the execution of the S command is seconds. U The time spent in the user mode during execution, the unit is second. P Execute the occupation ratio of the CPU when the command is executed. In fact, this number is the core mode plus the CPU time of the user mode divided by total time. The maximum value of the entity memory occupied by Memory Resources m. The unit is the average value of the entity memory occupied by KB T execution, and the unit is the total amount of memory occupied by the KB K executive program (STACK DATA TEXT), and the unit is self-information of the KB D execution program. The average size of the unshared data isa, the unit is the average size of the unshared stack of the KB P executable, and the unit is the average of the shared text. The unit is a KB Z system. The size of the memory page is byte. This is the number of major memory pages of this program for the same system. The so-called main memory page error is that a memory page has been replaced into the SWAP file and has been assigned to other programs. At this point, the content of this page must be read again from the replacement. R The number of times the secondary memory page of this program is incorrect. The so-called secondary memory page error is that although the memory page has been replaced into the replacement file, it is not allocated to other programs. At this point, the content of this page is not broken, and it is not necessary to read it from the replacement. W This program is forced to interrupt (like allocated CPU time depletion). Voluntary interruption (like a one-on-one I / O execution, like a disk read, etc.

The number of files input by this program o This program number RRO is the number of SOCKET Message S received by this program, the SIGNAL number received by the SOCKET Message K, the number of signals received by the Signal info C Execution parameters and EXIT STATUS) -p or --portability this option automatically sets the display format as: Real% e user% u sys% s The purpose of doing this is to POSIX specifications. -v or --verbose This option lists the resources used in all programs, not only in general English statements, but also instructions. People who don't want to spend time to set or just start to contact this instruction is quite useful. Example: Use the following instructions Time -V PS -AUX we can get the results of PS -AUX and system resources taken. As listed below: User PID% CPU% MEM VSZ RSS TTY Stat Start Time Command Root 1 0.0 0.4 1096 472? S APR19 0:04 Init Root 2 0.0 0.0 0 0? SW APR19 0:00 [KFlushd] root 3 0.0 0.0 0 0? SW APR19 0:00 [KPIOD] ... root 24269 0.0 1.0 2692 996 PTS / 3 R 12:16 0:00 ps -aux command being timed: "ps -aux" User Time SECONDS: 0.05 System Time (Seconds): 0.06 Percent of CPU this Job Got: 68% Elapsed (Wall Clock) Time (H: mm: SS OR M: SS): 0: 00.16 Average Shared Text Size (KBYTES): 0 Average unshared data size (kbytes): 0 Average Stack Size (Kbytes): 0 Average Total Size (KBYTES): 0 Maximum Resident Set Size (Kbytes): 0 Average Resident Set size (kbytes): 0 Major (Requiring I / O) page faults: 238 Minor (reclaiming a frame) page faults: 46 Voluntary context switches: 0 Involuntary context switches: 0 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 page size (bytes): 4096 EXIT STATUS: 0 Name: Uptime Use Permissions: All users use mode: uptime [-v] Description: U PTIME provides users below, no need for other parameters: The current time system is running to the current time connected to the number of users recently one minute, five minutes and fifteen systems load parameters: -v Display version information . Example: Uptime The result is: 10:41 AM UP 5 Days, 10 min, 1 Uses, Load average: 0.00, 0.00, 1.99 Name: CHFN Usage Permissions: All User Usage: Shell >> CHFN Description & # XF

F1a; providing users to change individual information, used for Finger and mail username example: shell >> CHFN Changing finger information for user password: [DEL] Name []: Johnney Huang ### provides information when providing finger Office []: NCCU Office phone []: [del] home phone []: [DEL] Name: ChSH Use Permissions: All Users Usage: Shell >> Chsh Description: Change the user shell setting example: shell >> Chsh Changing Fihanging Shell for User1 Password: [DEL] new shell [/ bin / tcsh]: ### [is currently used shell] [DEL] shell >> chsh -l ### display / etc / shells file content / bin / bash / bin / SH / BIN / ASH / BIN / BSH / BIN / TCSH / BIN / CSH "Finger [Back] Name: Finger Use Permissions: All Users User: Finger [Options] User [@address] Description: Finger can make users Quiet Some other users' information. The information will be listed is: login name user name home directory shell login status mail status .plan .project .forward where .plan, .project and .forward are the user in his home Directory Information in .PLAN, .Project, and .forward. If there is no. Finger directive is not limited to queries on the same server, you can also find the user on a remote server. Just give one Like the E-mail address, you can. -S -L -L multi-line display. -S single line display. This option only displays the login name, real name, terminal name, idle time, login time, office number and phone Number. If the user is the user is the user of the remote server, this option is invalid. Example: The following instructions You can check the information of this machine administrator: Finger root results as follows: login: root Name: root directory: / root shell: / bin / bash never logged in. Name: Last Usage Permissions: All users User: Shell >> Last [Options] Description: The display system is booting From the time of the month, the message will be sent to the Hostname of the Hostname - Num display before NUMENAME display username login message TTY Login message Contains Terminal code example: shell >> Last -R -2 Johnney PTS / 1 MON AUG 14 20:42 STILL Logged in Johnney PTS / 0 MON AUG 14 19:59 Still Logged in WTMP Begins Tue Aug 1 09:01:10 2000 ### / var / log / wtmp shell >> Last -2 Minery Minery PTS / 0 140.119.217.115 Mon Aug 14 18:37 - 18:40 (00:03) Minery PTS /

转载请注明原文地址:https://www.9cbs.com/read-3617.html

New Post(0)