----------------------- | CAT CD chmod chown cp cut | ------------ ----------- Name: CAT Use Permissions: All users use methods: cat [-abeensttuv] [--help] [--version] filename Description: Connect the file to the basics Output (screen or plus> filename to another) Parameters: -n or --Number starts with the number of rows number -b or -number-nonblank and -n of all outputs, but not numbered for blank lines -S or - SQUEEZE-Blank When there is a blank line with two consecutive lines, it is changed to a row of blank line -V or -show-nonprinting example: cat -n textfile1> textfile2 plus the archive content of TextFile1 After the upstream, enter the textfile2 this file CAT -B textfile1 textfile2 >> TextFile3 adds the contents of TextFile1 and TextFile2 to add the content after the line number (blank line does not add), the content is attached to TextFile3
Name: CD Usage Permissions: All users use mode: CD [DIRNAME] Description: Transform work catalog to DirName. Where the DirName representation can be an absolute path or relative path. If the directory name is omitted, transform to the user's Home Directory That is, the directory where I just login). In addition, "~" also expressed as the meaning of Home Directory, "." Means the current directory, ".." indicates the last layer of the current directory location. Example : Jump to / usr / bin /: cd / usr / bin
Jump to your own home directory: CD ~
Jump to the upper two layers of the current directory: cd ../ ..
Directive Name: CHMOD Usage: All users usage: chmod [-cfvr] [--help] [--version] mode file ... Description: Linux / UNIX file access rights are divided into three levels: file ownership , Group, other. How to use CHMOD how to control the files to be accessed by others. Tare: mode: Permissions Set strings, formats are as follows: [Ugoa ...] [ - =] [rwxx]. .. [, ...], where u indicates the owner of the file, G indicates that the owner of the file belongs to the same group (group), o represents the other, and A means that these three are . Indicates that the permissions are added, indicating that the permissions are canceled. R indicates that readable, W represents written, x represents executable, X represents only when the file is a sub-directory or the file has been set It is deserved to be executable. -C: If this file authority does have changed, it is displayed. All files in the current directory are the same permissions change (ie, changed one by one by hand) - Help: Display auxiliary instructions --Version: Display version example: Set file file1.txt Set the file file1.txt Read: chmod ugo r file1.txt
Setting the file file1.txt to be read: chmod a r file1.txt
Set the file file1.txt and file2.txt to this file owner, with its own same group of groups, but other people cannot write: Chmod Ug W, O-W File1.txt file2.txt
Set an ex1.py to only the file owner can be executed: chmod u x ex1.py
Set all the files and subdirectories in the current directory to anyone read: chmod -r a r *
In addition, CHMOD can also use numbers to indicate rights such as CHMOD 777 File syntax: chmod abc files, which are each number, which represents user, group, and other privileges. R = 4, w = 2, x = 1 To RWX attribute 4 2 1 = 7; to RW-attribute 4 2 = 6; if the RX property is 4 1 = 7.
Example: chmod a = rwx file and chmod 777 FILE effect The same CHMOD UG = RWX, o = x file and chmod 771 file effects same If you use CHMOD 4755 FileName to make this program with root permissions
Directive Name: Chown Use Permissions: Root Usage: Chmod [-cfhvr] [--help] [--Version] User [: group] file ...
Note: Linux / UNIX is multi-person multi-work industry, all of which have owners. Use Chown to change the owners of the files. In general, this instruction is only used by the system administrator (root). The general user does not have permission to change someone else's file owner, and there is no permission to change your own file owner to others. Only the system administrator (root has such permissions. Telome: User: New file owner User IDGroup: User Group (Group) - C: If the owner does have changed, it displays the change action -f: If the file owner cannot be changed, do not display the error message -H: Only for linking (LINK), not the LINK true pointing file -V: Display owner change details - R: All files in the current directory are identical with the subdirectories ( That is, changed one by one) - Help: Display auxiliary instructions --Version: Display version example: Set the owner of the file file1.txt User Jessie: Chown Jessie: Users file1.txt
Use all files in the current directory with the owner of the subdirectory to users of users Lamport: chmod -r Lamport: Users *
Name: CP Usage Permissions: All users Usage: CP [options] Source Dest CP [Options] Source ... Directory Description: Copy a file to another, or copy several files to another directory. GM: -A as much as possible to copy the files as much as possible. -R If the directory is included in the Source, the files in the directory are also copied to the destination. -F If the destination already The existence of the same file name, then delete the re-copy before copying. Example: copy the file aaa (already existing), and name BBB: CP AAA BBB
Copy all C language to the finished subdirectory: cp * .c finished
Name: CUT Usage Permissions: All User Usage: Cut-CNum1-Num2 FileName Description: Displaying the text from beginning to Num1 to Num2 from the beginning. Example: shell >> Cat Example Test2 this is test1 shell >> cut -c0- 6 Example ## print starts the first 6 words TEST2 THIS i
Name: Find usage: Find instructions: list files in accordance with Expression in the archive system. You can refer to the name, category, time, size, permission of the file, only the combination of different information, etc., will be listed fully Find determines the PATH and Expression in accordance with the following rules, the first one on the command - (),! The previous part is path, which is expression. If PATH is a null string, use the current path, if expression is empty The serial use -Print is more than twenty or thirty options that can be used in the preset expression Expression, only the most common partial part is introduced. -Mount, -xdev: only check and specify the directory in the same archive system The next file avoids listing files in other file systems - Amin N: Reading in the past N - Annewer File: Archives more late than file File - ATime N: In the past N days Reading files - CMIN N: Changed -cnewer file in the past N: file updated than file file -ctime N: Archive in the past N-day modified file -empty: empty file-gid n or -group name: GID is n or group name is name -ipath p, -path p: path name complies with P's file, IPath ignores case-Name Name, -iname name: file name complies with Name. InnAME Ignore the case -Size N: The file size is n unit, b represents the block of 512-bit group, c represents the number of words, and K indicates that kilo Bytes, W is two bit yuan group.-Type C: The file type is C Archives. D: Directory C: Documentation Device Archive B: Block Device Archive P: Total Salt F: General Archive L: Symbol S: Socket -Pid N: Process ID is the file You can use () Interval, and use the following operations. EXP1 -AND EXP2! EXPR-NOT EXP1 -OR EXP2 EXP1, EXP2 Example: All extended files in the current directory and its subdirectory are listed in C. # Find. Name "* .c" lists all the general files in its underlying directory, and all the current directorys and their subdirectories are listed in its subdirectory. The file updated in the last 20 minutes lists # find. -Ctime -20
Name: LESS Use Permissions: All users User: Less [option] FileName Description: LESS role is very similar to more, can be used to browse text files, different is Less allows users to go back to browse Some have been seen, while if the Less did not read the entire file at the beginning, it will be quickly. Example: Example: Example: Example: Example: Example: Example:
Direct Name: LN Use Permissions: All users use mode: ln [options] Source Dist, where Option is: [- BDFINSVF] [-S backup-suffix] [-V {numbered, existing, simple}] [- -help] [--Version] [-] Description: Linux / UNIX file system, there is a so-called link, we can treat it as an alias of the file, and the connection can be divided into two types: hard connection (Hard Link), Symbolic Link, the hard link means that a file can have multiple names, while the soft link mode is a special file that is the location of another file. Hard links are in the same archive system, while soft links can span different archive systems. Ln Source Dist is a link to Source, as for the use of hard links or soft links, is determined by parameters.
Whether it is a hard link or soft link, it will not copy a copy of the original file, and will only take a very small amount of disk space.
-f: The file will first delete the file with the DIST: Allow the system administrator hard link to your directory -i: When deleting the file with the DIST, I'm inquiry -N: In progress When the soft link, the Dist is treated as a general file-S: Symbolic link -V: The file name is displayed before the connection - B: Backup of files that will overwrite or deleted during the link - S Suffix: Plus the backup files - VMETHOD: Specify the way backup - HELP: Display Auxiliary Description --Version: Display version: Zs YY generates a Symbolic link: zz ln -s yy ZZ generates a Hard Link: ZZ LN YY XX Name: Locate User Permissions: Locate [-Q] [-d] [--database =] locate [-r] [--Regexp = ] Locate [-qv] [-o] [--output =] locate [-e] [-f] <[- l] [-c] <[- u] [-u]> locate [-VH] [ --Version] [--help] Description: Locate allows the user to quickly search the archive system has a specified file. The method is to build a database including all file names and paths in the system, after looking for Just query this database without having to go deep into the archive system. In a general distribution, the establishment of the database is placed automatically in the contab. General users are using # locate your_file_name when using # locate your_file_name The pattern is OK. Parameters: -u -u Establish the database, -U will start with the root directory, -U can specify the starting position.
-e will be excluded from the range of findings.-L is if it is 1. Start the security mode. In security mode, the user will not see the file that the permissions cannot be seen. This will slow down, because Locate must get the file permission information in the actual archive system. -F will be specific The archive system is excluded, for example, we have not to put the files in the proc archive system in the database. -Q is quiet mode, no error message. -N is displayed. -R Use a regular arithmetic The condition for finding. -O Specifies the name of the information. -D Specifies the path to the database - H Display Auxiliary Message-V Display More News-V Display Program Version Message Example:
LOCATE chDRV: Looking for all files called ChDRV locate -n 100 a.out: Look for all files called A.out, but only 100 locate -u: Establish a database
Name: LS Use Permissions: All users use mode: ls [-alrtafr] [name ...] Description: Displays the contents of the specified working directory (list the files and subdirectories included in the current work directory) .- a display All archives and directories (LS are within the beginning of the file name or directory name "." Will not be listed as hidden files, and will not be listed) -L In addition to the file name, file type, permissions, owner, file size, etc. Information Detailed List -R The file is displayed in the opposite order (originally in English alphabetics) -t sequence-t -A, but not listed "." (Current directory) and ".." (parent directory) -f plus a symbol after listed; for example, the executable file is added "*", the directory is added "/", if there is a file in the directory, the following files are also All the examples are selected: list all the names under the current working directory, and the newly reached: ls -ltr s * list all directories and file details below: Ls -lr / BIN lists all files and directories in the current work directory; the directory is later added "/", and the file can be executed after the name is added "*": ls -af
Name: More Use Permissions: All users use methods: more [-dlfpcsu] [-num] [ / pattern] [ LINENUM] [filenames ..] Description: Similar to CAT, it will be convenient in one page The user is reading page by page, and the most basic instruction is to press the blank key (Space) to display the next page, press the B button to come back (back) one page, and there is also the function of searching strings (with VI Similarly, use the description file, press h. Parameters: -num The number of rows displayed once-D prompts, display [Press Space to Continue, Q to Quit.], If the user presses the wrong button The [Press H for INSTRUCTIONS.] Instead of the beep-L cancels the number of function -F calculations when the special character ^ L (Paper feed character) is paused, in the actual number of rows, The number of lines after non-automatic wrap (some single lines will be expanded to two rows or two rows) -P does not display each page in a rollover, but first clear the screen, then display the contents-C follow -p Similarly, the difference is to display the content to clear other old information - Swai, when encountering a blank line with two consecutive lines, the blank line-U does not show the lower quotation marks (specified according to the environment variable TERM TERMINAL is different) / Seally the string (Pattern) before each file is displayed, then start displaying from the string NUM Start the display of FileNames from the Num Ring to display files, can be multiple numbers Example: More -s Testfile Displays the file contents of TestFile, if there are two consecutive lines of blank lines display. More 20 testfile Start the display of TestFile from the 20th line. Name: MV Use Permissions: All users use methods: mv [options] Source Dest MV [options] Source ... Directory Description: Move a file to another, or move several files to another. Parameters: -i If the destination The same name file is already asked whether to overwrite the old file. Example: Rename the file AAA to BBB: MV AAA BBB Moves all C language to the finished subdirectory: mv -i * .c
Name: RM Use Permissions: All users use mode: rm [options] name ... Description: Delete files and directories. Exquire to confirm before: -i deletion. -F even if the original file property is set to read, Direct deletion, no need to confirm one by one. Example: Remove all C language program files; remove all the files one by one before deleting: rm -i * .c will all files in the Finished subdirectory and subdirectory Delete: rm -r finished
Name: RMDir Use Permissions: All users with appropriate permissions in the current directory: RMDIR [-p] Dirname Description: Delete empty directories. Parameters: -p The manner that the subdirector is deleted so that it also becomes an empty directory. By the way, it is deleted. Example: Delete the subdirector of the working directory, named AAA: RMDIR AAA
In the BBB directory in the working directory, delete subdirectory called TEST. If Test is deleted, the BBB directory is empty directory, then BBB is also deleted. RMDIR -P BBB / TEST
Name: Split Use Permissions: All users use mode: split [option]]] Description: Split a file into several files from the INPUT division, the file name is prefixaa Prefixab ...; prefix preset value `x. If there is no input file or to` -, you will read the information from the standard. 兜: -b, --bytes = size size value for each output file Size, unit is Byte. -C, --Line-bytes = size In each output, the maximum number of BYTEs in the single line. -L, --Lines = Number Number value is the number of column numbers for each output. -Number Same as -l number. Before each output file is opened, the column is printed to the standard error output. --Help Displays the secondary information and then leave. --Version lists the information and then leave. Size Add unit: b represents 512, K represents 1K, M represents 1 meg. Example: Postgressql Large Database Backup and Recycling: Because Postgres allows the form to be larger capacity of your system file, you have to put the form dump to a single file There is a problem, using split to divide.% Pg_dump dbname | split -b 1m - filename.dump. Re-load% createDb DBNAME% cat filename.dump. * | PGSQL DBNAME
Name: Touch Use Permissions: All users use mode: touch [-ACFM] [-r reference-file] [-file = reference-file] [-t mmddhhmm [[cc] yy] [. Ss]] [ D Time] [--DATE = TIME] [--Time = {Atime, Access, Use, Mtime, Modify}] [--NO-CREATE] [--HELP] [--Version] file1 [file2 ... ]
Description: Touch instruction changes the time record of the file. LS -L can display the time record of the file. Parameters: A Change the read time record of the file. M change the modification time record of the file. C If the purpose file does not exist, it will not establish new Archives. Like -No-create effect. F is not used, is reserved in order to compatibility with other UNIX systems. R Use the time record of the reference file, the same as the -file effect. D Setting time With the date, you can use a variety of different formats. T. Time logging, the format is the same as the DATE directive. --NO-CREATE does not establish a new file. --Help lists the instruction format. --Version list Message. Example: The simplest way of use, change the file when the file is recorded to the current time. If the file does not exist, the system will establish a new file. Touch file touch file1 file2 will change the time record of File to May 6 At 18:33, BC two thousand years. Time format can refer to the Date directive, at least you need to enter MMDDHHMM, is a month time and division .touch -c -t 05061803 file touch -c -t 050618032000 File changes the File time record Like Referencefile.touch -r ReferenceFile File
The time record of File is changed to 18:36 in May 6 and 2,000. Time can use AM, PM or 24-hour format, and other formats can be used in other formats such as 6 May 2000. Touch -d "6:03 PM "File Touch -d" 05/06/2000 "File Touch -D" 6:03 PM 05/06/2000 "File
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, The Time's format is HH: mm, HH is HH, mm is minutes, and you can also specify AM, PM, Midnight, Noon, Teatime (4 pm), etc. If you want to specify more than one day Time, you can use MMDDYY or MM / DD / YY format, where mm is minutes, and DD is on the day, yy is the year. In addition, the user can even use the NOW time interval to flexibility specify time, The time interval can be minutes, hours, days, weeks, can also specify Today or Tomorrow to represent today or tomorrow. When time and press Enter, AT will enter the conversation mode and ask for input instructions or Program, 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. Time: -v: Print Publication Number - Q: Using 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 number of Queue is A, B, C ... Z and A, B, ... Z total 52 A -M: Even if the program / instruction is executed, there is no output result, but also send the letter to the user -f file: read the pre-written command file. Users do not have to use the conversation mode to enter, can first All specified first after writing a file again, then read -l: List all the specified (the user can use ATQ directly without AT -L) -D: Delete design (users can also use ATRM without using AT -d) -v: The specified example that has been completed but has not been deleted: 5 pm after three days of execution / bin / ls: at 5pm 3 days / bin / ls three weeks later 5 pm / BIN / LS: AT 5PM 2 Weeks / Bin / LS
Tomorrow's 17:20 execution / bin / date: at 17:20 tomorrow / bin / date 1999 last day of the last day of 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]] Description: Display calendar. If there is only one parameter, represent the year (1-9999), show the annual calendar. Year must All written: `` CAL 89 / will not be the calendar of 1989. Use two parameters, indicating the month and years. If there is no parameters, this month's calendar is displayed. On the third day of 1752, I will change Western Chinese calendar, because most countries use new calendars, there are 10 days of removal, so the monthly calendar of this month is somewhat different. It is the old calendar in the past. 匡 兜: -m: Take Monday is weekly The first day is displayed. -J: Displayed with a Caesa, that is, the number of days from January 1st. -Y: Show this year 's calendar. Example: Cal: Show this month of the month. # 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: Shows AD 2001 Calendar. [root @ mylinux / root] # CAL 2001 2001
January February March 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 12 13 14 15 16 17 21 22 23 24 25 25 26 27 18 19 20 21 22 23 24 18 19 20 21 22 23 24 28 29 30 31 25 26 27 28 25 26 27 28 29 30 31April May June Su Mo Tu We TH fr SU Mo 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 15 16 222 23 24 25 25 26 27 28 20 21 22 23 24 25 26 17 18 19 20 21 22 23 29 30 27 28 29 30 31 24 25 26 27 28 29 30
July August September Su Mo Tu We TH fr 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 17 18 9 10 11 12 13 14 15 222 23 24 25 26 27 28 19 20 21 22 23 24 25 25 16 17 18 19 20 21 22 29 30 31 26 2728 29 272324 25 26 27 28 29 30 October November December Su Mo Tu We TH fr SU Mo Tu We TH fr sa su mo tu we th Fr 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 17 18 19 20 11 12 13 14 15 16 17 9 10 11 12 13 14 15 21 22 23 24 25 25 26 27 18 19 20 21 22 23 24222222229 30 31 25 26 27 28 29 30 23 24 25 26 27 28 29 30 31
[root @ MYLINUX / root] #
CAL 5 2001: Shows AD in May 2001.
[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 week is the week, showing 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 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 46 47 48 49 50 16 17 18 19 20 21 22 55 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 63 64 92 65 66 67 68 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 139 140 141 163 164 165 166 167 144 145 146 147 148 170 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 183 214 215 216 217 188 189 190 219 220 221 222 223 224 225 191 192 193 194 195 196 197 226 227 228 229 230 231 232 198 199 20020239 205 206 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 245 246 275 276 277 278 279 280 281 247 242 253 282 283 284 254 255 256 257 258 259 260 289 290 295 261 262 263 264 265 266 267 296 297 298 299 300 301 302 268 269 270 271 272 273 274 303 304 305
November December Sun Mon Tue Wed Thu Fri Sat 303 333 314 315 316 338 339 344 341 342 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 358 335 332 333 334 335 359 360 361 362 363 364 365 366 [root @ mylinux / root] #
Name: crontab Use Permissions: All users use: crontab [-u user] filecrontab [-u user] {-l | -r | -e} Description: crontab is used to make users permed at fixed time or fixed intervals The use of the program, in other words, that is, the like's schedule.-U user means setting the schedule of the specified user, this premise is that you have to have its permissions (such as root) can be specified Total of others. If you don't use -u user, it means setting your own schedule. Parameters:
-e: Perform a text editor to set a time program, the contents of the text editor is VI. If you want to use the other text editor, please set the Visual environment variable to specify the use of that text editor (for example STENV Visual Joe) -r: Delete the current Turkey -L: List the current schedule
The format of the schedule is as follows: F1 F2 F3 F4 F5 Program
Where F1 is a minute, F2 represents hours, and F3 represents the first few days in one month, F4 represents the month, F5 represents the first few days in the week. Program represents the program to be executed. When F1 is *, it means that every minute To perform Program, F2 is * indicates that the program is executed per hour, and the remaining classes are pushed to f1 to AB, indicating that from the first minutes to the second time, F2 is displayed from the first to B. B. When the hour is to be executed, the remaining classes have been pushed to f1 * / n, which is executed once every N minute, and F2 is * / n means that each time interval is executed once, and the remaining classes are pushed for F1 to A, B, C, ... When the first, b, c, ... minutes to perform, F2 is A, B, C, ... indicate first, b, c ... hour to execute, the remaining classes You can also store all settings first in the file file, set the time schedule in the case of crontab file. Example: Performed once per hour per hour per hour / bin / ls: 0 7 * * * / Bin / LS
In December, 6:00 pm every day, per 20 minutes per 20 minutes / usr / bin / backup: 0 6-12 / 3 * 12 * / usr / bin / backup
On Monday to Friday, send a letter to Alex@domain.name: 0 17 * * 1-5 mail -s "hi" alex@domain.name tmp / maildata
Every month, daily midnight 0:20, 2:20, 4:20 .... Executive Echo "Haha" 20 0-23 / 2 * * * echo "Haha"
Note: When executed in the time you specified, the system will send you a letter to you, show the program executed, if you don't want to receive such a letter, please add it in every line of empty! / 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, user You can set the format you want to display, and the format is set to a plus sign after the number of tags, where the list of markers are as follows: Time:
%: Print% N: Next VII T: Jumping% H: Hours (00..23)% i: Hours (01..12)% K: Hours (0..23)% l: hour ( 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 From January 1, 1970 00:00 UTC to the second few% S: Second (00..61)% T: Direct display time (24 hours)% x: equivalent to% h:% M: % S% Z: Show time zone
Date:% A: Sun..SAT)% A: Sunday..saturday% B: Month (JAN..DEC)% B: January..DecEmber)% 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 (@53) (in the first day of Sunday)% W: The first day of the week (0..6 )% W: The first day of the year (00..53) (the first day of Monday)% x: Direct display (mm / dd / yy)% Y: The last two of the year Digital (00.99)% Y: Complete Year (0000..999)
If it does not start 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, yy is two digits after year, SS is the number of seconds: -d datestr: Display time (non-system time) set in DateStr - HELP: Display Assistance News - S DateStr: The system time is set to date - the time set in DateStr - Show current Greenwich Time --Version: Display version number: Show time jump, then display the current date: DATE % T% N% D display Month and Japanese: DATE % B% D
Display date and set time (12:34:56): Date --date 12:34:56 Note: When you don't want to have meaningless 0 (for example, 1999/03/07), you can mark Insert - symbols, such as Date % - H:% - M:% - S will remove the meaningless 0 in seconds, like the original 08:09:04 variable to 8: 9: 4. Only by obtaining permissions (such as root) can set the system time. When you change the system time with root, please write the system time to CMOS with clock -w, so that the system time is updated next time. The latest correct value will be continuously held. Name: SLEEP Usage Permissions: All users use methods: sleep [--help] [--version] Number [SMHD] Description: SLEEP can be used to delay the current action to delay a period of time parameters Description: - HELP: Display Assistance News - Version: Display version number Number: Time length, back can be connected to S, M, H or D in seconds, m is minutes, H is hour, D is an alopehy number: display After the time is delayed for 1 minute, then display time again: Date; Sleep 1M; Date
Name: Time Use Permissions: All Users User: Time [Options] Command [Arguments] Description: Time instructions are used in measurement of time and system resources such as measurement of specific instructions. For example, CPU time, memory Body, input and output, etc. It is necessary to note that some information can not be displayed on Linux. This is because the allocation of the resource on Linux is not the same as the TIME instruction, so that the TIME instruction These information cannot be obtained. Tel: -o or --output = file setting result output file. This option will write the output of the Time to the specified file. If the file already exists, the system will override its content. A or --Append is used to write the result to the end of the file without overwriting the original content. -f format or --format = format Sets the display mode with format string. When this option is not When 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. Generally set, you can use / t indicate the jump, or use / n to resemble the wrap. Each information is to be used as a preamble. If you want to use a percentage symbol in the string, use it. (People who have learned C language will feel very familiar There are four major items that the TIME instructions can display, namely:
Time Resources Memory Resources Io Resources Command Info Detailed content: Time Resources E Execute the time spent in the instruction, the format is: [Hour]: minute: second. Please note that this number does not mean the actual CPU time. E Executive instruction Time spent, the unit is second. Please note that this number does not mean the actual CPU time. S command is taken at the core mode (kernel mode), the unit is second. U instruction is executed in user mode (User) The time spent in Mode is second. PRACOPU's occupation ratio when the command is executed. In fact, this number is the core mode plus the user mode CPU time divided by total time.
Memory Resources M executes the maximum value of the entity memory occupied. The unit is the average value of the entity memory occupied by the KB T execute, and the unit is the total amount of memory occupied by the KB K executive (Stack Data Text) The average size, the unit is the average size of the self-information area of the KB D execution program, and the unit is the average size of the unshared stack of the KB P executable, and the unit is a KB X execution program. The average of shared text is the size of the KB Z system memory, and the unit is BYTE. This is a constant for the same system.
Io Resources F This program The number of main memory page errors occur. 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 time The content must be read again from the replacement. R The secondary memory page error occurred. The so-called secondary memory page error is that although the memory page has been replaced, but has not been assigned Give other programs. At this time, the content of this page is not broken, and it is not necessary to read it from the replacement. W This program is swapped to the replacement file. C. This program is forced to interrupt (like the distributed CPU time is exhausted) The number of times the number of voluntary disruptions (like a number of files input by I / O execution, like a disk reading, etc.), the number of files output by this program is the number of files output by this program R Sound Message K received by SOCKET Message S received this program (Signal) received by this program
Command INFO C is executed with the end code of the command name X command (Exit Status)
-p or --portability This option will automatically set the display format as: Real% e user% u sys% s The purpose is to compat with the POSIX specification. -v or --verbose This option will put all the program The resource used in the medium is listed, not only as the general English statement, but also the person who does not want to spend time to design or have just started to contact this instruction is quite useful. Example: Use the following instruction 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? 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: uptime [-v] Description: Uptime Provides the user below, no 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 minutes system load parameters: -v Display version information. Example: uptime its result is: 10:41 AM UP 5 Days, 10 min, 1 Uses, Load Average: 0.00, 0.00, 1.99
Name: CHFN Use Permissions: All User Usage: Shell >> CHFN Description: Provide 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 User 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 by Shell] [DEL] shell >> Chsh -l ### display / etc / shells file content / bin / bash / bin / sh / bin / ash / bin / BSH / BIN / TCSH / BIN / CSH
"Finger" Name: Finger Use Permissions: All users use methods: finger [options] User [@address] Description: Finger allows the user to query some other user's information. The information will be listed is: login name User name Home Directory Shell Login Status Mail Status .plan .project .vesforward
Where. PLAN, .Project and .Forward are the information in the files such as .plan, .project, and .forward in his home directory. If there is no. Finger directive is not limited to inquiry on the same server You can also find the user on a remote server. Just give an address like an E-mail address. Turn the meter: -l Multi-line display. This option shows only the login name , Real name, terminal name, idle time, login time, office number and phone number. If the user is the user's user, this option is invalid.
Example: The following instructions can check the information of this machine administrator: Finger root
The results are as follows: login: root name: root directory: / root shell: / bin / bash never logged in. No mail. No plan.
Name: Last Usage Permissions: All users use methods: shell >> Last [options] Description: The display system is started from the initial message from the initial entrant per month: -r 省 省 Hostname's field -Num display before NUM UserName Show 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 / 0 140.119.217.115 Mon Aug 14 17:22 - 17:24 (00:02 WTMP Begins Tue Aug 1 09:01:10 2000
Name: Login doesn't do this command! Oh, I am not here, I have a push ink to delay everyone's beautiful youth ^ _ ^
Name: Passwd Use Permissions: All users use mode: Passwd [-k] [-l] [-u [-f]] [-d] [-s] [username] Description: Use to change the user's password parameters : -k -l -u -f -d Close the user's password authentication function, the user will not be able to enter the password when logging in, only the user who has root privileges can be used. -s Display the password authentication of the specified user Types, only users with root privileges can be used. [Username] Specifies the account name.
Name: WHO Use Weight: All users can use: WHO - [husfv] [user] Description: There are those users in the display system being on, the displayed data contains the user ID, the terminal used, From there, online time, lag time, CPU usage, action, etc. Tare: -h: Do not display the title column - U: Do not display the user's action / work-S: use short format Display -f: Do not display the user's online location -V: display program name: / etc / aliases Use permission: System Manager Usage: Please use newaliase update database Description: Sendmail will use one in / etc / aliases The file is made by the user name conversion. When sendmail receives a letter to XXX, it will give another user according to the contents of the AliaSS file. This feature can create a valid only in the letters system Users. For example, mailing list uses this feature. In MailingList, we may create MailingList called Redlinux@link.ecpi.edu, but actually does not have a user called RedLinux. Real aliase The content is to receive a letter to this user to receive the Mailing List process. / Etc / aliase is a text mode file, Sendmail requires a binary format /etc/aliases.db.newaliases The functional pass is to convert / etc / aliases to a repository that Sendmail can understand. Example: # newaliases
The following command will do the same thing, # sendmail -bi
Related Commands: Mail, Mailq, Newaliases, Sendmail
"Mail [Back] Name: Mail Use Permissions: All users use mode: mail [-iinv] [-S Subject] [-c cc-addr] [-b bcc-addr] User1 [user 2 ...] : Mail is not only a directive, Mail is also an email program, but people who use Mail to read the letter should be very few! Mail for system managers is very useful, because managers can write Script with mail, regularly send some regular Memorandum reminds the user of the system.
Parameters: I ignore the interrupt signal of TTY. (Interrupt) I forced to set up an interactive mode. For example, the location of the send, the state, etc. (Verbose) N does not read the mail.rc setting file SMD title. C CCC email address. Example: Send the letter to one or more email addresses, because the user must enter the title and the contents of the message. And USER2 is not The host position will be given to the user2 user of the mail server. Mail user1@emil.address mail user1@emil.address user2
Sending mail.txt's content to user2 to user1. If you set this line instruction to cronjob, you can send a memo to the system user. Mail -s Title - C User1 USER2 Directive: MESG Use Permissions: All users Usage: MESG [Y | N] Description: Decide whether other people are allowed to get to their own terminal interface: Y: Allow messages to the terminal interface. N: No Allow messages on the terminal interface. If there is no setting, the message delivery is fixed by the terminal interface. Example: Changing the current message setting, change to the end mesh: Mesg N Directives related to MESG are: Talk, Write, Wall. Name: / etc / aliases Use Permissions: System Manager User: NewaliaS Description: Sendmail uses a movement of the user name transition in / etc / aliases. When Sendmail receives a letter to XXX It will be given to another user according to the contents of the AliaSS file. This feature can create a user only in the letter system. For example, mailing list uses this feature. In MailingList, we may create one Call Redlinux@link.ecE.uci.edu's mailinglist, but actually doesn't have a user called RedLinux. The actual aliase file is to receive the mail to this user to receive the mail. Work ./etc/aliases is a file program, sendmail requires a binary format /etc/aliases.db.newaliaSS to convert / etc / aliases into a repository that Sendmail can understand. Parameters: No parameters. Example: # newaliases The following command will do the same thing, # sendmail -bi related commands: Mail, Mailq, NewaliaS, Sendmail Name: Talk Use Permissions: All users Usage: Talk Person [TTYNAME] Description: Talk to other users: Person: The user account for the interpretation, if the user is on other machines, you can enter Person@machine.name TTYNAME: If the user has more than two TTY connectors, you can choose the appropriate TTY newspaper example. 1: Talking to the user Rolland on the machine, then Rolland only one connection : Talk Rollaend Next is the RollaEnd response, if rollaend accepts, ROLLAEND Enter the `Talk Jzlee` to start talking, press Ctrl C example. 2: Talk to the user rolland on Linuxfab.cx, use PTS / 2 to talk: talk rolland@linuxfab.cx PTS / 2 The next step is to respond, if rollaend accepts, RollaEnd Enter the `Talk Jzlee @ Jzlee.home`, you can start talking, press Ctrl C to pay attention: If the word of the screen appears abnormal character, try Press CTRL L to update the screen screen. Name: WALL Use Permissions: All users use mode: Wall [message] Use instructions: Wall will pass the message to each MESG to be used to get the user. When using the terminal interface as standard, the message is incorporated At the end, you need to add EOF (usually using Ctrl D) Example: Communication "Hi" gives each user: Wall Hi Name: Write Use Permissions: All users use mode: Write user [TTYNAME] Description: Communication to other users: user: Prepared message TTYNAME: If the user has more than two TTY Line, you can choose the right TTY newspaper example. 1: The news gives Rolland, at this time, Rolland has only one connection: Write Rolland The next is to hit the message, please press CTRL C. Example. 2: Communication to Rolland, Rolland's connection with PTS / 2, PTS / 3: Write RollaEnd PTS / 2 The next step is to hit the message, please press Ctrl C to pay attention: If the other party sets MESG N, the interpretation will not pass to the other party. Name: KILL Use Permissions: All users use methods: kill [-s signal | -p] [-a] pid ... kill -l [signal] Description: KILL sends a specific signal (Signal) to the stroke ID The PID's stroke makes a specific action based on this signal. If no specified, the preset is a signal gripmeter of the termination (TERM): wherein the signal available is Hup (1), KILL (9), Term (15), represents heavy run, cut off, end; detailed signals can be printed with kill -l -p: PID, do not send signal -L (Signal): list all available signal name: PID is cut off (KILL): Kill -9 323 Running the PID to 456 (Restart): Kill-Hup 456 Name: NICE Use Permissions: All users How to use: nice [-n adjustment] [-adjustment] [--adjustment = Adjustment] [--help] [--version] [Command [arg ...]]] Description: Execute a program with a changed priority If the program is not specified, the current scheduling priority is printed, the internal ADJUSTMENT is 10, the range is -20 (highest priority) to 19 (minimum priority) Time: -n Adjustment, -Adjustment, -adjustment = Adjustment is an additional Adjustment - HELP display for this original priority to display the version information: Nice -n 1 LS plus 1 and execute: nice -n 1 ls Add 10 priority sequences and execute: Nice LS adds the priority of the LS 10 and execute Note: Priority is used for the job system to determine the parameters assigned by the CPU. Linux uses the "Round-Robin" to do the CPU schedule, the higher the priority, the cpu time that may be obtained more. Name: PS Usage Permissions: All users use mode: PS [options] [--help] Description: Show the dynamic parameters of the moment: PS [Options] Dynamic parameters: PS is very large, only a few common parameters are listed here and Ondering Introduction Meaning-A List All Tour-W Display Widening You can display more information -au Display more detailed information -Aux Display all strokes that contain other users Au (x) output format: User PID% CPU% MEM VSZ RSS TTY Stat Start Time Command User: PID% PID: PID% CPU: User CPU Usage% MEM: Occupied Memory Usage VSZ: Used Virtual Memory Size RSS: Used Memory Size TTY: The secondary device number of the terminal Stat: The state of this stroke: D: Uninterrupted stationary (通 □ □ b performs I / O action) R: is being executed : Static status T: Pause to execute Z: No to exist but temporarily unable to eliminate W: Not enough memory paging assigns <: high priority stroke N: low priority stroke L: There is a memory paging assignment and lock in memory In vivo (instant system or AI / O) START: Time Time Time: Performed Time Command: The instruction performed example: Ps Pid Tty Time CMD 2791 TTYP0 00:00:00 TCSH 3092 TTYP0 00:00:00 PS% PS -A PID TTY TIME CMD 1? 00:00:03 INIT 2? 00:00 KFlushd 3? 00:00 : 00 Kpiod 4? 00:00:00 kswapd 5? 00:00:00 mdrecoveryd .......% PS -AUX User PID% CPU% MEM VSZ RSS TTY Stat Start Time Command Root 1 0.0 0.7 1096 472? S Sep10 0:03 init [3] root 2 0.0 0.0 0 0? SW SEP10 0:00 [KFLUSHD] root 3 0.0 0.0 0 0? SW SEP10 0:00 [KPIOD] root 4 0.0 0.0 0 0? SW SEP10 0: 00 [KSWAPD] ........ Name: PStree Use Permissions: All users use methods: pstree [-a] [-c] [-h | -hpid] [-l] [-n] [- P] [-u] [-g | -u] [PID | User] PStree -V Description: Display all the strokes in a tree diagram, the tree map will be based on PID (if you have specified) or in init. The stroke is root (root) If there is a specified user ID, the tree map only shows the stroke parameters owned by the user: -a Displays the full instructions and parameters of the trip, if it is replaced by the memory Then add bracket -c if there is a rebounded stroke name, separately (preset value will be added in front * Example: PStree INIT - - AMD | -APMD | -ATD | -HTTPD --- 10 * [httpd]% PSTree -P init (1) - - AMD (447) | -APMD (105) | -ATD (339)% PStree-CIT - - AMD | -APMD | -ATD | -HTTPD - - httpd | | - httpd | | -httpd .... Name: RENICE Use Permissions: All users How to use: renice priority [[-p] pid ...] [[-g] pgrp ...] [[-U] user ...] Description: Re-specify the priority of one or more strokes (one or more of the parameters will be determined according to the parameters below): -p pid re-specifies the priority of the ID of the stroke to PID -G PGRP Re-specify the ID of the stroke group (Process Group) PGRP's stroke (one or more) priority - User re-specifies the priority example example of the stroke owner for User: The stroke ID is 987 and 32 strokes Plus 1: renice 1 987 -u daemon root -p 32 Note: Every troot is a unique ID every stroke Name: TOP Usage Permissions: All users use mode: TOP [-] [d delay] [q] [c] [s] [s] [i] [n] [b] description: Instant display of Process dynamic : D: Change the displayed update speed, or in the TCTIVE column (Interactive Command) Press SQ: There is no delayed display speed, if the user has a superuser permission, TOP will perform C at the highest priority : Switching the display mode, there are two modes, one is only the name of the execution file, the other is the complete path and name S: cumulative mode, the subtraction of the sub-stroke that is completed or disappeared, the CPU Time accumulates S: Safety mode, cancels the conversation instructions, avoids potential crisis i: No idle (IDLE) or useless (Zombie) stroke N: update number, will exit TOP B: Batch after completion The file mode, with the "N" parameter, can be used to output the results of TOP to the archive: display update ten times after exiting; Top -n 10 users will not use the conversation instructions to the stroke command: TOP -S Enter the update display twice into the file name to top.log: TOP-N 2 -B Name: Skill Usage Permissions: All users usage: skill [signal to send] [options] Select the rule description of the program: Send a message to the program that is executing, the preset message is Term (interrupt), and the more common information is three ways to write, and 0 messages: -9, -sigkill, -Kill, you can use -l or -l already listed the available messages. General parameters: -f fast mode / have not completed -i interactive mode / each action will be confirmed -V detailed output / list of selected programs Information - W Intelligent Warning Information / None No Action / Display Procedure Code Parameters: Select the rules of the program can be, the terminal code, the user name, the program code, the command name. -T Terminal code (TTY or PTY) -u User Name -P Program Code (PID) -c Command Name You can use the signal: The name of the known signal name, the signal code, and function are listed below. Name (code) function / Description ALRM 14 Leaves HUP 1 Leaving INT 2 Leaving KILL 9 Leaving PIPE 13 Leaving PROW PROW TERM 15 Leaving USR1 Leaving USR2 Leaving VTALRM Leaving STKFLT Leaving / Only I386, M68K, ARM and PPC hardware unused leaves / only for I386, M68K, ARM, and PPC hardware TSTP stop / generating behavior TTIN stop / generating behavior Ttou stop / generate behavior of behavior stoP stop / forcing shutdown Conta from the new start / if the stop state is started from the new, otherwise ignore the PWR ignore / ignore Winch in some systems ignore CHLD ignore ABRT 6 core FPE 8 core ILL 4 core Quit 3 core SEGV 11 core Trap 5 core SYS core / perhaps Undepended EMT core / perhaps unplanned BUS core / core failure XCPU core / core failure XFSZ core / core failure example: Stop all programs Skill -kill -V PTS / * on the PTY device to stop three users User1, USER2, User3 Skill -stop User1 User2 User3 Other related commands: kill Name: EXPR Usage Permissions: All users ### string length shell >> Expr Length "this is a test" 14 ### Digital Commercial Shell >> EXPR 14% 9 5 ### From the location of the string shell >> Expr Substr "this is a test" 3 5 IS IS ### Digital String Only The First Charactershell >> Expr Index "Testforthegame" E 2 ### String Real Reproduction Shell >> EXPR Quote THISAISTFORMELA THISATSTFORMELA Name: TR ### 1. Compare to the side of the directory all uppercase files to lowercase files? There seems to be a lot of ways, "TR" is one of them: #! / Bin / sh dir = "/ tmp / testdir"; files = `Find $ dir -type f`; for i in $ files do dir_name =` Dirname $ I`; Ori_FileName = `BaseName $ I` NEW $ Ori_FileName | Tr [: Upper:] [: Lower:]`> / dev / null; #echo $ new_filename; mv $ dir_name / $ ori_filename $ dir_name / $ 000 New_FileName Done ### 2. ourselves ... LowerCase to Uppercase Tr Abcdef ... [DEL] ABCDE ... [DEL] TR A-Z A-Z TR [: Lower:] [: Upper:] Shell >> Echo "this is a test" | TR A-Z A-Z> WWW shell >> Cat WWW this is a test ### 3. Remove the string shell >> Tr -d this ### Remove the T.E.T THIS Man Man Test E ### 4. Replace Strings Shell >> Tr - "this" "Test" this Test TH TE Directive: CLEAR Up: Clear the screen. How to use: Enter clear on Console. Name: Reset, Tset How to Use: Tset [-iqqrs] [-] [-e ch] [-i ch] [-k ch] [-m mapping] [Terminal] Instructions: Reset actually and tset is a command Its use is to set the status of the terminal. In general, this command will automatically determine the current terminal from the environment variable, command column, or other configuration gear. If the specified state is? This program will ask the user to enter the terms of the terminal. Since this program sets back the terminal back to the original state, in addition to the use of login, when the system terminal enters some strange states because the program is not properly executed, you can also use it to reset the terminal O, for example Carefully enter the binary file to use the CAT instruction to the terminal, often there is a terminal that no longer responds to the keyboard input, or responds to some strange numerals. At this time, you can reply to the original status with RESET. Option Description: -p The terminal machine category is displayed on the screen, but does not do the set action. This command can be used to obtain the category of the current terminal.-e CH Set the ERASE unit into a CH -I CH will be set to the interrupt character. Ch -K CH will delete a line of characters set to CH -I not to make a set action. If there is no use -Q, the erase, interrupt and deletion of the current value of the era will still be sent to the screen. -Q Don't The value of ERASE, interrupts and deletes characters is displayed on the screen. -R The terminal machine class is printed on the screen. -R Sends the type of command to the TERM to send to the terminal, usually in .login or Use examples in .profile: Let the user enter a terminal model and set the terminal to the type of preset. # Reset? Set the ERASE character set Control-h # reset -e ^ b Display the string of settings on the screen # reset -S Erase IS Control-B (^ b). Kill IS Control-U (^ U). Interrupt is control-c (^ c). Term = xterm; name : Compress Use Permissions: All users use methods: compress [-dfvcv] [-b maxbits] [file ...] Description: Compress is a fairly ancient UNIX file compression instruction, compressed files will add one .z The extended file is distinguished from uncompressed files. The compressed file can be decompressed in uncompress. To press the plurality of files into a compressed file, the file TAR must be compressed first. Since Gzip can generate more ideal compression ratios, The general people have changed more gzip to archive compression tools. Parameters: C Output results to standard output devices (General referred to screen) F Forced writing files, if the destination already exists, it will be covered (force). The message is printed on the screen (Verbose) B sets the upper limit of the number of strings, calculates with bit yuan, can set the value of 9 to 16 bits. The more common strings that can be used due to the value, the more common strings can be used. The larger the compression ratio, so the preset value 16 bits (bits) D will use the compressed file unzipped the V list: Source.dat is compressed into source.dat.z, if source.dat.z already exists The content will be covered by the compressed file. Compress -f Source.dat Complicate Source.dat into source.dat.z and prints the compression ratio. -V and -f can be used with compress -vf source.dat After outputting the compressed data, import Target.dat.z can change the compressed file name .compress -c Source.dat> target.dat.z The larger the value of -b, the larger the compression ratio, the range is 9-16, the preset value is 16. Compress -b 12 Source.dat The Source.dat.z is extracted into source.dat. If the file already exists, the user presses Y to determine the coverage file. If the -df program is used, the file will be automatically covered. Since the system will join .Z is the extended file name, so Source.dat will automatically be treated as Source.dat.z. Compress -d source.dat compress -d source.dat.z Name: LPD Usage Permissions: All users use mode: LPD [-l] [#port] LPD is a resident printper management program, which manages local or remote prints according to the content / etc / printcap content Each of the tablets defined in the table ./etc/PrintCap must have a corresponding directory in / var / lpd. In the directory, the file starts with CF, indicates a print work waiting to be sent to the appropriate device. This file It is usually produced by the LPR. LPR and LPD constitute a system that you can work offline. When you use LPR, the printing machine does not need to be available immediately, and there is no existence .LPD automatically monitors the status of the printing machine, when the press is online, Deliver the file. This has all applications don't have to wait for the previous job. Parameters: -l: Display some unortped messages on standard output. #Port: In general, LPD will use GetServbyName to get Proper TCP / IP Port, you can use this parameter to force LPD to use the specified port. Example: This program is usually performed in the system start phase in /etc/rc.d. Name LPQ - Display Unfinished Work LPQ [L] [P] [User] in the list machine is stored in LPQ Displays an item that is not completed by the list of list managers managed by the LPD. Example Example 1. Display all Work in the LP list machine # lpq -plprank Owner Job FILES TOTAL SIZE1ST ROOT 238 (Standard Input) 1428646 BYtes Related functions LPR, LPC, LPD Name: LPR Use Permissions: All users use methods: lpr [-pprinter] Send files or distributed by standard input to the printing machine, the printing machine management LPD will be later This file is given to the appropriate program or device processing. LPR can be used to process the material to the local or distal host. Parameters :-Pprinter: Send the data to the specified printed machine Printer, preset value For LP. Example: Send www.c and kkk.c to the printer LP. Lpr -plp www.c kkk.c Name: Lprm - Remove a job by the printing machine to remove usage / usr / BIN / LPRM [P] [File ...] Description The work that has not been completed will be placed in the printing machine, which can be used to cancel the work of the printing machine. Due to each A print machine has a separate storage, you can use the -p command to set the printing machine you want to function. If you are not set, you will use the system-preset press. This command will check Is there enough permissions to delete a specified file, in general, only the owner of the file or the system administrator has this permission. Example Remove the No. 1123 of the printer HPPrinter 1123 Remove the LPRM 1011 from the 1011th work from the preset printing machine Name: FDFormat Usage Permissions: All users use methods: fdformat [-n] Device instructions: low-order formatting of the specified flop machine device. When using this instruction, it is best to specify the image. The following device: / DEV / FD0D360 disk machine A:, magnetic 360KB disk / dev / fd0h1440 disk machine A:, magnetic disk is 1.4MB disk / DEV / FD1H1200 disk machine B:, magnetic disk is 1.2MB disk If you use a device like / dev / fd0, if the disk inside is not a standard capacity, formatting may fail. Under this circumstance, the user can specify the necessary parameters first with the setFDPRM instruction. Parameters: -n Close the confirmation function. This option will turn off the confirmation step after formatting. Example: fdformat -n / dev / fd0h1440 format the magnetic disk of the disk into a 1.4MB magnetic piece. And omitted the confirmation step. Name: MFORMAT Usage Permissions: All users use methods: mformat [-t cylinders] [-h heads] [-S sectors] [-l volume_label] [-f] [-i fsver-sion] [-s sizecode] [ -2 Sectors_ON_TRACK_0] [-M Software_sector_size] [-A] [-X] [-C] [-H Hidden_sectors] [-r root_sector] [-b boot_sector] [-0 rate_on_track_0] [-A RATE_ON_THER_TRACKS] [-1] [-k] Drive: DOS archive system is established on a magnetic sheet that has been done in a low-order format. If you open the parameters of USE_2M when compiling MTools, the parameters associated with 2M format will work. Otherwise, these parameters (like s, 2, 1, m) does not have effects. Parameters: Synlider number -h head (HEAD) number -S number -L tag -f tag -f -F to format the magnetic disk into FAT32 format, but This parameter is still in the experiment. -I Sets the version number in FAT32. This is also still in the experiment. -S magnetic area size code, calculation mode for sector = 2 ^ (size code 7) -C magnetne (Cluster The number of magnetic regions. If the given number will cause the number of magnets that exceed the FAT table, MFORMAT will automatically amplify the number of magnetic regions. The size of the magnetic area. This number is the magnetic area size returned by the system. Usually actual The size is the same. -A If this parameter is added, MFormat generates a set of ATARI systems to this soft disc. -X will format the flop to XDF format. You must use the XDFCopy instruction to make a low order with the XDFCOPY instruction before use. Formatted action. -C generates a disk image file that can be installed MS-DOS archive system. Of course, this parameter is meaningless to an entity disk machine. -H hidden the number of magnetic regions. This is usually When applicable to the split area of the formatting the hard drive, because there is a segmentation table in front of a split area. This parameter is not tested, it can not be used without it. -N disk serial number -R root directory size, unit is the number of magnetic regions This parameter is only valid for FAT12 and FAT16. -b uses the specified file or the power-on magnetic area of the device as this flap or division zone. Of course, the hardware parameters are more moving. -K Try to keep the original boot magnetic area. -0 Data transfer rate-5 other data transmission rate other than the 0th rails - 2 MFORMAT A: MFORMAT A: MFORMAT A: MFORMAT A: This will use the preset value A: (是 / DEV / FD0) Map Format. Name: MKDOSFS Usage Permissions: All users use methods: mkdosfs [-c | -l filename] [-f number_of_fats] [-f fat_size] [- i volume_id] [-M message_file] [-R root_dir_entry] [-s sector_per_clus Ter] [-v] device [block_count] Description: Create a DOS archive system. Device means that you want to create a device code of the DOS file system. Like / dev / hda1, etc.. Block_count is the number of blocks you want to configure. If block_count is not specified, the system automatically calculates the number of blocks that meet the size of the device. Parameters: -c Pre-check whether there is a bad track before establishing a file system. -L reads bad track records from a determined file. f Specify the number of FAT, File Allocation Table. The preset value is 2. Currently Linux's FAT file system does not support more than 2 FAT tables. Usually this does not need to be changed. -f specifies the size of the FAT table, usually Yes 12 or 16 unit groups. 12-bit groups are usually used for disks, and 16-bit groups are used for segmentation regions for general hard disks, which is called FAT16 format. This value usually selects appropriate Value. Using FAT16 on the disk usually does not take effect, in vice, use FAT12 on the hard disk. -I Specifies the Volume ID. Generally, the number of 4 bit tuples, like 2e203a47. If not give The system will generate itself. -M When the user tries to boot using this magnetic or divided zone, the system will give the user a warning message to the user. This parameter is used to change this message. You can First edit it, then specify this parameter, or use -m - so system will ask you to enter this text directly. It is important to note that the strings in the file should not exceed 418 words, including expanded Jumping flag (