Name: CAT Use Permissions: All users use mode: cat [-abeensttuv] [--help] [--Version] filename Description: Connect the file to the basic output (screen or plus> filename to another) Parameters: -N or --Number is similar to the number of rows numbers -b or -number-nonblank and -n of all outputs, but it is encountered for blank lines - s or - Squeeze-blank On two consecutive rows of blank lines, it is changed to the blank line of the line -V or -Show-nonprinting
Example: cat -n textfile1> textfile2 Plus TextFile1 files After adding the line number, enter the textfile2. Cat -b textfile1 textfile2 >> TextFile3 adds the file content of TextFile1 and TextFile2 to add the line number (blank line does not add) TEXTFILE3
Name: CD Usage Permissions: All users
How to use: CD [DIRNAME]
Description: Transform work catalog to Dirname. 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 Login is located).
In addition, "~" is also expressed as HOME DIRECTORY, "." Means the current directory, ".." indicates the current directory 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 Permissions: All users
How to use: chmod [-cfvr] [--help] [--version] mode file ...
Description: Linux / UNIX file access rights are divided into three levels: file owners, groups, others. Using CHMOD how to control the file is accessed by others.
Tie count:
Mode: Permissions Set strings, formats are as follows: [Ugoa ...] [[ - =] [RWXX] ...] [, ...], where u indicates the owner of the file, G represents The owner of the file belongs to the same group (group), o represents the other people, and a means that these are all. Represents increased permissions, indicates cancellation, = indicates unique setting permissions. R indicates that readable, W represents written, x represents executable, X represents only when the file is a subdirectory or the file has been set to be executed. -c: If this file authority does have changed, it is displayed in the change action -f: If this file authority cannot be changed, do not display the error message-V: Display permission change - R: All files in current directory Permissions change with the subdirectory (that is, changed by one by one) - HELP: Display Auxiliary Description --Version: Display version
Example: Set the file file1.txt to all people can 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 can read: ChMOD -R A R * Also CHMOD can also use the number to indicate that the authority of the CHMOD 777 File is: Chmod ABC file
Where A, B, C are each number, which represents USER, Group, and Other permissions.
R = 4, w = 2, x = 1 To RWX attribute 4 2 1 = 7; to RW-attribute 4 2 = 6; if the R-X property is 4 1 = 7.
Example: chmod a = rwx file
CHMOD 777 File
Effects the same chmod ug = rwx, o = x file
CHMOD 771 FILE
Effect
If you use CHMOD 4755 FileName, this program has root permissions
Directive Name: Chown Use Permissions: root
How to use: chmod [-cfhvr] [--help] [--version] user [: group] file ...
Description: Linux / UNIX is multi-person multi-work industry, all of which have owners. Use Chown to change the owners of the file. In general, this instruction only is used by the system administrator (root), and the general user has no permissions to change someone else's file owner, and there is no permission to change the owner of its own files to others. Only the system administrator (root) has such permissions.
Tie count:
User: New Archive owner's user IDGroup: New Archive owner's User Group (Group) -c: If the file owner does have changed, the change action is displayed - F: If the owner cannot Do not display the error message - H: only for links (LINK), not the LINK, true pointing file -V: Display owner change - R: All files and subdirectories in current directory Perform the same owner change (ie, changed one by one by way) - Help: Display Auxiliary Description --Version: Display version
Example: Set the owner of the file file1.txt to the User Group 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 Use Permissions: All users
Use mode:
CP [options] Source Dest CP [Options] Source ... Directory
Description: Copy a file to another, or copy several files to another directory.
Put on
-a will copy the file status, permissions and other materials as much as possible. -r If the Source contains a directory name, the files in the directory are also copied to the destination. -f If the destination already has the same file, it is deleted before the replication is removed. 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
Use permission: All users
Usage: cut-cnum1-num2 filename
Description: Shows the text that counts Num1 to Num2 from the beginning.
example:
Shell >> Cat Example Test2 this is test1 shell >> Cut -c0-6 example ## print counts the first 6 words TEST2 THIS i
Name: Find usage: Find instructions:
List of files that comply with Expression in the archive system. You can refer to a combination of different information such as the name, category, time, size, permissions, etc., only fully matched. Find determines the Path and Expression on the following rules, first on the command - (), the previous part is PATH, after which is Expression. If PATH is a empty string, use the current path, if expression is the empty string, use -print as the preset expression
There are more than two or thirty options that can be used in Expression, which only introduces the most commonly used part.
-mount, -XDEV: Only check and specify files under the same archive system, avoid listing files in other file systems - Amin N: Reads in the past N - Annewer File: More than file file Night-read file -Atime N: Files read in the past N: CMIN N: Changed in the past N: -cnewer file: file updated than file file - CTIME N: in the past N Sky-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-write- Name name, -iname name: The file name is compliant with the file. INAME ignores uppercase-size N: The file size is n unit, b represents the block of 512-bit yuan group, c represents the number of words, and K means kilo bytes, W is two bit groups. -type C: The file type is C file. D: Directory C: Dip Device Archive B: Block Device Archive P: Total Salt F: General Archive L: Symbol Connection S: Socket -Pid N: Process ID is N
You can use () to separate the arithmetic, and use the following operations. Exp1 -and Exp2! EXPR-NOT EXP1 -OR EXP2 EXP1, EXP2 Example: List of all extended files in the current directory and its subdirectory is C. # Find. -name "* .c"
List all the general files in its underlying directory therefrom # find. -Ftype f
List of all files updated in the current directory and its subdirectory # Find. -Ctime -20
Name: Less
Use permission: All users
Use mode:
Less [option] FileName
Description: The role of Less is very similar to more, can be used to browse the text file, the difference is that the LESS allows the user to scroll back to browse the already seen part, and because the Less does not read at the beginning The entire file, so when you encounter a large file, it will be fast than the general instrument editor (such as VI).
example:
Directive Name: LN Use Permissions: All users
How to use: ln [options] Source Dist, where Option is:
[-BDFINSVF] [-S backup-suffix] [-v {numbered, existing, simple}] [--help] [--version] [-] Description: Linux / UNIX file system, so-called linking ( LINK, we can treat it as an alias of the file, and the link can be divided into two types: hard links and soft links, hard links means that a file can have multiple names, and The soft connection method is to generate a special file, and the content of the file is to point to another file. Hard links are in the same archive system, while soft links can span different archive systems. The LN Source Dist is a link (dist) to SOURCE, as for the use of the hard link or soft link, is determined by the parameter. 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
Generate a Hard Link: ZZ LN YY XX with the file yy
Name: Locate Usage Permissions: All users use mode: locate [-q] [-d] [--Database =] locate [-r] [--Regexp =] locate [-qv] [-o] [- Output =] locate [-e] [-f] <[- l] [-c] <[- u] [-u]> locate [-VH] [--Version] [--help] Description: Locate let Users can quickly search for the specified file in the archive system. Its method is to build a database including all file names and paths in the system, and then only query this database when looking for, 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 use as long as used
# locate your_file_name
The model is OK. Parameters: -u -u
Establish a database, -U will start by the root directory, and -U can specify the starting position.
-e
Will exclude the range of findings.
-l if it is 1. Start safe mode. In safe mode, the user will not see the file that is not available. This will slow down because Locate must obtain the permission information of the file in the actual archive system.
-f Examples of specific archives systems, for example, we have not to put the files in the proc archive system in the database.
-q quiet mode does not display any error messages.
-N is displayed to display an output.
-r Use a regular arithmetic condition for the condition.
-o Specifies the name of the stock.
-d
Specify the path to the database
-h display auxiliary message
-v Show more messages
-V display version of the version of the message:
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
How to use: ls [-alrtafr] [Name ...] Description: Displays the contents of the specified working directory (list the files and subdirectories included in the current work directory).
-A Displays all files and directories (LS instead of starting the archive name or directory name "." is considered hidden file, not listed) -L In addition to the file name, file type, permissions, owner, The size of the file is detailed -R -R to display the file in the opposite order (original alphabetical order) -t list -A -A-A, but not listed "." (Current) Directory) and ".." (parent directory) -f plus a symbol after listed; for example, the executable is added "*", the directory is added "/" if there is a file in the directory, then the following The archives are also listed sequentially
Example: List all the names in the current working directory, the beginning of the beginning, the getting upset behind: ls -ltr s *
List all directories and file details below / bin directory: ls -lr / bin
List all files and directories in the current work directory; directory is then 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, in use, press H. Parameters: -Num The number of rows -D prompt users, display [Press Space to Continue, Q to Quit.] Below the screen, if the user presses the wrong button, [Press H for instructions.] Instead of Beep-L cancels the number of function -f calculating rows when the special font ^ L (paper feed character) is met, the number of rows after the actual line, not the number of rows after the automatic wrap (some single line words It will be extended to two rows or more.) -P does not display each page in a row, but first cleared the screen, then display the content-C and -p, the difference is to display the content and then clear other Old Data-S When there is a blank line with two consecutive lines, the blank line-U does not display the lower quotation marks (depending on the TERMINAL specified by the environment variable TERM) / in each file display Search for the string (Pattern), then start displaying from the string NUM Start displaying filenames from the NUM row to display files to display the contents of the content, can be used as a number of quotable examples: more -s testfile Displays the file content of Testfile If there are two consecutive lines of blank lines display in a row of blank lines. More 20 Testfile starts the contents of Testfile from the 20th line.
Name: MV Use Permissions: All users
Use mode:
MV [Options] Source Dest MV [Options] Source ... Directory Description: Move a file to another file or move several files to another directory. Parameters: -i If the destination already has the same name file, first ask if the old file is overwritten. example:
Rename the file AAA to BBB: MV AAA BBB
Move all C language to the finished subdirectory: mv -i * .c
Name: RM Use Permissions: All users
How to use: rm [options] name ...
Description: Delete files and directories.
Put on
-i before the deletion, please ask for confirmation one by one. -f even if the original file property is set to read, it is also directly deleted without one by one. -r Detects the directory and below. Example: Delete all C language program files; ask for a one before deleting confirmation: rm -i * .c
Remove all files in the Finished subdirectory and subdirectory: RM -R Finished
Name: RMDIR Use Permissions: All users with appropriate permissions in current directory
How to use: rmdir [-p] DIRNAME
Description: Delete empty directories.
Parameters: -P is that when the subdirector is deleted, it will also be deleted by the way.
example:
Remove the subdirectory named AAA in the working directory: RMDIR AAA
In the BBB directory in the working directory, delete the subdirectory called TEST. If the Test is deleted, the BBB directory is empty, then BBB is also deleted. RMDIR -P BBB / TEST
Name: SPLIT Use Permissions: All users
How to use: split [option] [INPUT [prefix]]
Description:
Split a file into several files. From the INPUT division output into a fixed size file, its file name is prefixaa, prefixab ...; prefix preset value is **** x. If there is no input file or **** -, you will be read from the standard input.
匡 兜
-b, --Bytes = Size
The size value is the size of each output file, and the unit is BYTE. -C, --Line-bytes = size
In each output, the maximum number of BYTEs in a single line. -L, --Lines = Number
The Number value is the size of the column size of each output. -Number
The same as -l Number. --Verbose
Print the detection information to standard error output before each output file is opened. --help
Display auxiliary information and then leave. --Version
Listed by this information and then leave. Size can join the unit: b represents 512, K represents 1k, M represents 1 meg.
example:
Postgressql Large Data Library Backup and Recycling:
Because Postgres allows the form to have a largest capacity of your system file, it is possible to have problems with table dump to a single file, and Split is used to divide.
% PG_Dump DBNAME | SPLIT -B 1M - FileName.dump.
Reload
% createDb dbname% cat filename.dump. * | PGSQL DBNAME
Name: Touch Use Permissions: All users
How to use: Touch [-ACFM] [-r reference-file] [-file = reference-file] [-t mmddhhmm [[cc] yy] [-d time] [--DATE = Time ] [--Time = {Atime, Access, Use, Mtime, Modify}] [--NO-CREATE] [--HELP] [--Version] File1 [file2 ...] Description: Touch Directive changes the time recording. LS -L can display the time record of the file.
Parameters: a Changing 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 a new file. Like -No-Create. F is not used, is to retain to compatibility with other UNIX systems. r Use the reference file time record, like the effect of thefile. D Setting time and date, you can use a variety of different formats. T Time Record of the file is set, the format is the same as the DATE instruction. --NO-CREATE does not establish a new file. --Help lists the instruction format. --Version lists this message.
example:
The simplest way of use, change the file when you record the time. If the file does not exist, a new file will be established.
Touch File Touch file1 file2
Change the time record of File to 18:3:39 on May 6, 2,000 years. Time format can refer to the Date directive, at least you need to enter MMDDHHMM, which is the time of months and minutes.
Touch-C -T 05061803 File Touch-C -T 050618032000 File
Change the File time record into ReferenceFile.
Touch -R ReferenceFile File
The time record of File is changed to 18:3:36 on May 6, two thousand years old. Time can be used in 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
How to use: At -V [-q queue] [-f file] [-mldbv] Time
Description: AT allows the user to specify a certain number or instruction in Time, TIME's format is HH: mm, the HH of HH is hour, MM is minutes, or you can specify AM, PM, Midnight, Noon, Teatime (is 4 pm).
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 a NOW time interval to elastic designation time, where the interval can be Minutes, Hours, Days, Weeks
In addition, the user can also 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 .
Tie count:
-V: Print Publish No. -Q: Use the specified 伫 伫 (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 - M: Even if the program / instruction is executed, there is no output result, but also send a letter to the user -f file: read the pre-write command files. 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
5 pm after three weeks, execution / bin / ls: AT 5PM 2 Weeks / Bin / LS
Tomorrow's 17:20 execution / bin / date: at 17:20 Tomorrow / BIN / DATE
The last day of 1999 printing the end of world! At 23:59 12/31/1999 echo the end of world!
Name: CAL
Use permission: All users
How to use: CAL [-MJY] [MONTH [YEAR]]
Description:
Display calendar. If there is only one parameter, it represents the year (1-9999), showing the annual calendar. The year must be written: ******** Cal 89 will not be the annual calendar showing 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 weekdays 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 25 26 27 28 29 30 31
[root @ MYLINUX / root] #
CAL 2001: Shows the annual calendar of AD.
[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 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 19 19 19 10 11 12 13 14 15 16 22 23 24 25 25 262722222222 23 24 25 25 26 17 18 19 20 21 22 23 29 30 27 28 29 29 29 29 30 July August September 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 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 22 23 24 25 25 26 27 28 19 20 21 22 23 24 222 29 30 31 26 27 28 29 30 31 23 24 25 26 27 28 29 30 October November Dence 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 2122223 24 25 22 23 24 16 17 18 19 20 21 22 28 29 29 29 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: Displays the number of days from January 1st.
[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 174 171 172 173 174 175 176 149 150 151 152 177 178 179 180 181 182july 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 225 191 192 193 194 195 196 197 226 227 228 298 29 200202020220220220220220 209 202 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 279 277 278 279 280 282 251 252 253 282 287 288 254 255 256 297 258 259 260 289 290 291 292 293 294 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 mode:
Crontab [-U user] filecrontab [-u user] {-l | -r | -e} Description: crontab is used to make users in fixed time or fixed interval executable, in other words, similar to use Time history. -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 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, and F4 represents 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 ... Hourly to be executed, the rest
Users can also store all settings first in the file file, and set the time schedule in the way in the CRONTAB FILE. Example:
Perform once a day 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:
After executing 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> / dev after each line of empty / NULL 2> & 1. Name: Date Use Permissions: All users
Use mode:
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 the display, the user can set the format that wants to display, the format is set to a plurality of plus numbers, where the available tag list is 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, format HH: MMS [AP] M)% s: from 1970 January 1 00: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, and SS is the number of seconds:
-d DateStr: Displays the time (non-system time) set in DateStr - Help: Display Auxiliary Message - S DateStr: Set the time to date in DateStr to display the current Greenwich Time --Version: Display version number
Example: During the display time, the current date is displayed: Date % T% N% D
Display month and day: 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 insert - symbols in the mark, such as Date % - H:% - M:% - S will not be in seconds The meaning of the meaning is removed, like the original 08:09:04 will be 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 Use Permissions: All users
How to use: Sleep [--help] [--version] Number [SMHD]
Description: Sleep can be used to delay the current action for a while
Parameter Description :
--help: Display auxiliary message --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 the number of days
Example: Show current time after delay in 1 minute, then display time again: Date; Sleep 1M; Date
Name: Time Use Permissions: All users
How to use: Time [Options] Command [arguments]
Description: The use of the Time command is information such as time and system resources that measure the time and system resources required for 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.
Put on
-o or --output = file setting result Output file. 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 jumping column, 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. (People who learn C language will feel very familiar) Time instructions can display four major items, respectively:
Time Resources Memory Resources Io Resources Command Info
The detailed content is as follows:
Time Resources E Execute the time spent in the instruction, the format is: [Hour]: minuteecond. 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 number of files entered by the number of I / O execution, like a disk reading, etc.), the number of files outputted by this program R R RO of this program R This program has received Socket Message S Signal (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 be compatible with 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 the 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 (H: MMS or MS): 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 page size (bytes): 4096 Exit status: 0 Name: uPtime Usage Permissions: All users User use: uptime [-v] Description: Uptime provides the following information, no other parameter:
The current time system is running to the current time connected to the number of users recently, five minutes and fifteen - system load parameters: -v Displays the version information. Example: Uptime The result is: 10:41 AM UP 5 Days, 10 min, 1 Users, Load average: 0.00, 0.00, 1.99
Name: CHFN
Use permission: All users
Usage: shell >> CHFN
Description: Provide users to change individual information 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 permission: All users
Usage: shell >> Chsh
Description: Change the user shell setting
example:
Shell >> Chsh Chang1 Password: [DEL] New shell [/ bin / tcsh]: ### [is currently used shell] [DEL]
Shell >> Chsh -l ### 展 / / etc / shells file content / bin / bash / bin / sh / bin / ash / bin / bsh / bin / tcsh / bin / csh
"Finger" Name: Finger Use Permissions: All users
How to use: finger [Options] user [@address]
Note: 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 .flan.project .forward
Where. PLAN, .Project and .Forward are the data in the file in his Home Directory. ProWard, etc. If there is no. The Finger directive is not limited to queries on the same server, or you can find users on a remote server. Just give an address like an e-mail address. Put on
-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. This option is invalid if the user is the user of the remote server.
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
Use permission: All users
How to use: shell >> Last [Options]
Explanation: The display system has been a message from the beginning of the month.
Put on
-R 省 Hostname's field -Num show before NUM UserName 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 / 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
This order will not be done! Oh, I am not here, I have a push ink to delay everyone's beautiful youth ^ _ ^
Name: Passwd
Use permission: All users
How to use: Passwd [-k] [-l] [-u [-f]] [-d] [-s] [username]
Description: Used to change the password of the user
Parameters: -k
-L
-u
-f
-d Close the user's password authentication function, the user will not be able to enter a password when logging in, and only the user who has root privileges can be used.
-S Displays the specified user's password authentication species, only the user who has root privileges can be used.
[username] Specifies the account name.
Name: WHO use power line: all users can use
How to use: WHO - [husfv] [user]
Note: There are those users in the display system being on, and the data displayed contains the user ID, the terminal used, connected from there, online time, lag time, CPU usage, action, etc.
Tie count:
-H: Do not display the title column -u: Do not display the user's action / work-S: Use the short format to display -f: Do not display the user's online location -V: display program version name: / etc / aliases use Permissions: System Manager Usage: Please use the newaliase update database Description: Sendmail uses an action that converts the user name transition in / etc / aliases. When sendmail receives a letter to XXX, it will be given to another by the content of the AliaSS file. This feature creates a user who is only valid in the letters system. For example, Mailing List uses this feature. In MailingList, we may create a mailingList called Redlinux@link.ecpi.edu, but actually doesn't have a user named RedLinux. The actual AliaSS file is to receive the Mailing List processing of the Mailing List processing. / etc / aliases is a file file, Sendmail requires a binary format /etc/aliases.db. NEWALIASES's functional is to convert / etc / aliases into 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 permission: All users
How to use: mail [-iinv] [-S Subject] [-c cc-addr] [-b bcc-addr] user1 [user 2 ...]
Note: Mail is not only an instruction, but Mail is also an email program, but people who use Mail to read the letter should be very few! For system managers, Mail is useful, because managers can write to Script with Mail, regularly send some memorandum of reminder systems.
Parameters: I ignore the interrupt signal of TTY. (Interrupt) I forced to set up interactive mode. (Interactive) V lists the message, such as the location, state, etc. of the send letter, etc. (Verbose) N Do not read the mail.rc setting file. S Mail title. C CC mail address. B BCC email address.
example:
Get the letter to one or more email addresses, because no other options are added, the user must enter the contents of the title and the letter. User2 does not have a host position, it will be given to the user2 user of the mail server.
Mail User1@email.address mail user1@email.address user2
Sending the content of mail.txt to user2 simultaneously CC 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 How to use: MESG [y | n] Explanation: Decide if other people are allowed to pass on their own terminal Put on Y: Allow messages to the terminal interface. n: Do not allow messages to the terminal interface. If there is no setting, the message delivery is fixed by the terminal interface. Example: Changing the current message setting, changed to the end mesh: MESG N Directives related to MESG are: Talk, Write, Wall. Name: / etc / aliases Use Permissions: System Manager Usage: NewaliaSs Description: Sendmail uses an action that converts the user name transition in / etc / aliases. When sendmail receives a letter to XXX, it will be given to another by the content of the AliaSS file. This feature creates a user who is only valid in the letters system. For example, Mailing List uses this feature. In MailingList, we may create a mailingList called Redlinux@link.ecpi.edu, but actually doesn't have a user named RedLinux. The actual AliaSS file is to receive the Mailing List processing of the Mailing List processing. / etc / aliases is a file file, Sendmail requires a binary format /etc/aliases.db. NEWALIASES's functional is 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, Newaliases, Sendmail Name: Talk Use Permissions: All users Use mode: Talk Person [TTYNAME] Description: Talk to other users Tie count: Person: Prepare the user account, if the user can enter Person@machine.name ttyname on other machines: If the user has more than two TTY connectors, you can choose the right TTY message. Example. 1: Talking to the user Rolland on the machine now, then Rollaend has only one connection: Talk Rolland The next step is to respond, if rollaend accepts, rollaend input **** talk jzlee **** can start talking, press CTRL C Example. 2: Talk to the user Rolland on Linuxfab.cx, use PTS / 2 to talk: Talk RollaEnd@linuxfab.cx PTS / 2 The next step is to respond, if rollaend accepts, rollaend input **** talk jzlee@jzlee.home *** can start talking, please press CTRL C Note: If the word of the screen will appear abnormal characters, try to update the screen picture in Ctrl L. Name: WALL Use Permissions: All users Use mode: Wall [Message] Instructions: Wall transmits the message to each MESG to set it to YES. When using the terminal interface as standard, 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 Tie count: User: User account TTYNAME: If the user has more than two TTY connectors, you can choose the right TTY message. Example. 1: The news is given to ROLLAEND, and 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 has PTS / 2, PTS / 3: Write RollaEnd PTS / 2 Next, hit the message, please press CTRL C Note: If the other party sets MESG N, the interpretation will not pass to the other party. Name: Kill Use Permissions: All users Use mode: Kill [-s signal | -p] [-a] pid ... kill -l [signal] Description: KILL sends a specific signal (Signal) to the stroke ID as a specific action based on this signal, If there is no designation, the preset is to send a signal to terminate (TERM). -S (Signal): Among them, the signals are HUP (1), KILL (9), TERM (15), which represents heavy run, cut off, end; detailed signals can be printed with the PID Do not send the signal -L (Signal): list all available signal names: Cut the PID 323 (KILL): Kill -9 323 Running the PID of 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 the program with a changed priority, if not specified, print the current scheduled priority, the internal Adjustment is 10, the range is -20 (highest priority) to 19 (minimum priority) Put on -n adjustment, -adjustment, --adjustment = Adjustment is the addition of the original priority Adjustment --Help Display Self-Help Display Release Information Example: Put the priority of the LS 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 instructions executed: 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 map, the tree map will be the root (root) in PID (if there is specified) or in init, 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 stroke, if it is replaced by the memory body, it will add bracket -c if there is a rebound The trip name is listed separately (the 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 ...] Explanation: Refaten a priority of one or more strokes (one or more will depend on the above parameters) Put on -p PID re-specifies the ID of the ID of the stroke to the priority of the stroke of the PID -G PGRP re-specifies the id of the stroke group (one or more) of the PGRP (one or more) priority -u user re-specifies the stroke owner Example of priority for User Tour: Tour of the stroke ID of 987 and 32 is Daemon and root priority number plus 1: renice 1 987 -u daemon root -p 32 Note: Each trip ( Process has a unique ID Name: TOP Usage Permissions: All users How to use: TOP [-] [D DELAY] [q] [c] [s] [s] [i] [n] [b] Explanation: Display Process dynamics instantly Put on D: Change the displayed update speed, or press SQ: No delay display speed, if the user has the permission of Superuser, TOP will perform C: Switching the display mode, there are two modes, one is only the name of the execution file, the other is to display the full path and the name S: cumulative mode, the CPU Time of the DEAD CHILD Process, which will complete or disappear. Cumulative S: Safety mode, cancel the conversation instruction, avoid potential crisis i: No idle (IDLE) or useless (Zombie) stroke N: update number, will exit TOP B: Batch file after completion Mode, with "N" parameters, can be used to output TOP's results to the file Example: Show out after ten times to display; top -n 10 Users will not use the conversation instruction to the stroke command: top -s Enter the update display twice into the file name to top.log: TOP-N 2 -B Name: Skill Use permission: All users How to use: skill [signal to send] [options] Select the rules of the program Description: Send a signal to the executable program, the preset message is Term (interrupt), the more often used information is HUP, INT, KILL, STOP, CONT, and 0 The message has three ways: -9, -sigkill, -kill, can use -l or -l already listed the available messages. General parameters: -f fast mode / has not been completed -i interactive mode / each action will be confirmed -V Detailed output / list of selected programs -w Intelligent warning message / has not been completed -n no action / display program code Parameters: The rules of the selection can be that 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 known signal name, signal code, and function will be listed below. Name (code) function / description ALRM 14 leaves HUP 1 leave INT 2 leave Kill 9 leaves / forced close PIPE 13 leaves Poll leaves PROF leave Term 15 leaves USR1 leaves USR2 leaves VTALRM leaves STKFLT leaves / only for I386, M68K, ARM, and PPC hardware Unused leaves / only for I386, M68K, ARM, and PPC hardware TSTP stop / generate behavior related to content TTIN stop / generate behavior related to content Ttou stop / generate behavior related to content STOP stop / forced shutdown CONT From the new start / if the stop state is started, otherwise ignore PWR ignores / leave Winch ignore in some systems CHLD ignores ABRT 6 core FPE 8 core Ill 4 core Quit 3 core SEGV 11 core TRAP 5 core SYS core / perhaps no actual EMT core / perhaps no actual BUS core / core failure XCPU core / core failure XFSZ core / core failure example: Stop all program skill -kill -v pts / * on the PTY device Stop three users USER1, User2, user3 skill -stop user1 user2 user3 Other related commands: kill Name: EXPR Use permission: All users ### string length Shell >> EXPR Length "this is a test" 14 ### Digital Commercial Number Shell >> EXPR 14% 9 5 ### From the location Shell >> EXPR SUBSTR "this is a test" 3 5 IS IS ### Digital Skewers Only The First Character Shell >> Expr Index "Testforthegame" E 2 ### String truly reproduced Shell >> EXPR Quote Thisisatestfor Mela ThisisateStFormela Name: TR ### 1. Compare to the part to change all uppercase files in the directory to lowercase files? There seems to be many 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_FILENAME = **** Echo $ Ori_FileName | TR [: Upper:] [: Lower:] ****> / dev / null; #echo $ new_filename; mv $ dir_name / $ Ori_FileName $ DIR_NAME / $ 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 of unwanted 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 TE Directive: CLEAR Utue: 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 for use: Reset actually and tset is a command that is the purpose of setting the terminal. In general, this command will automatically determine the current terminal of the current terminal from the environment variable, command column, or other configuration. If the specified type 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 Be careful to enter the binary file with the CAT directive to the terminal, often there is a terminal that does not respond to the keyboard input, or responds to some strange characters. You can reply to the original state with RESET. Option Description: -p Displays the terminal category on the screen, but does not make the set action. This command can be used to achieve the category of the current terminal. -e ch Associates the ERASE unit into a CH -I CH to set the interrupt character into ch -K CH will delete the character of the row to set a CH -I to do the set action. If there is no option -Q, ERASE , The current value of the interrupt and deletion of the character will still be sent to the screen. -Q Do not display ERASE, interrupt, and delete the value of the character to the screen. -r Prints the terminal machine class on the screen. -s Send the typed string of the command to the TERM to the terminal, usually in .login or .profile example: Let the user enter a terminal model and set the terminal to the type. Preset status. # RESET? Set the ERASE character set Control-h # reset -e ^ b Display the string of setting 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 permission: All users How to use: Compress [-dfvcv] [-B Maxbits] [file ...] Note: Compress is a fairly ancient UNIX file compression instruction. The compressed file will add a .z extended file name to distinguish an uncompressed file, and the compressed file can be decompressed in uncompress. To press the plurality of files into a compressed file, you must first turn the archive Tar and then compress. 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 overwritten (force) the message executed by the program on the screen (Verbose) B The upper limit of the number of common strings is set, and the value can be set to 9 to 16 BITS with bit yuan. Due to the larger value, the more common strings that can be used, the larger the compression ratio, so the preset value 16 bits (bits) D will use the compressed file unzipped the V listing message. example: Complicate Source.dat into source.dat.z, if Source.dat.z already exists, the content is overwritten 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 together Compress -VF Source.dat When the compressed data is output, 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, and the preset value is 16. Compress -b 12 Source.dat Unfolding Source.dat.z into Source.dat. If the file already exists, the user presses Y to determine the coverage file, and the file will be automatically covered if the -df program is used. Since the system will automatically join .Z is an extended file name, Source.dat will automatically be treated as Source.dat.z. Compress -d source.dat compress -d source.dat.z Name: LPD Use permission: All users How to use: LPD [-l] [#port] LPD is a resident printing machine management, which manages local or distal printers based on / etc / printcap content. Each printer defined in / etc / printcap must have a corresponding directory in / var / lpd. In the directory, a copy of the CF starts in a directory indicates a printing work waiting to be sent to the appropriate device. This file is usually generated by the LPR. LPR and LPD constitute a system that can work offline. When you use LPR, the printing machine does not need to be available immediately, and no existence. LPD automatically monitors the status of the printing machine. When the press is online, the file will be sent immediately. This has to wait for the previous work to complete the previous job. parameter: -l: Display some of the unlocked messages on the standard output. #port: In general, LPD uses GetServByName to get the appropriate TCP / IP Port, you can use this parameter to force LPD to use the specified port. Example: This program is usually performed at the beginning of the system from the program in /etc/rc.d. Name LPQ - Displays unfinished work usage in the listing machine LPQ [L] [P] [User] Note that LPQ displays items that are not completed in the list of lists managed by the LPD. Example Example 1. Display all work in the LP list machine # lpq -pljPrank Owner Job Files Total Size1st Root 238 (Standard Input) 1428646 Bytes Related functions LPR, LPC, LPD Name: LPR Use permission: All users Using the way: lpr [-pprinter] sent files or distributed by standard input to the printing machine, the printing machine management program LPD will give this file to the appropriate program or device. deal with. The LPR can be used to process the material to be sent to the local or distal host. parameter: -pprinter: Send the data to the specified printer Printer, the preset value is 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 / usr / bin / lprm [p] [file ...] NUMTRISTERS Work is placed in the printing machine, this command can be used to cancel the work of the printing machine. Since each printer has a separate storage, you can use the -P command to set the printed machine you want to function. If there is no setting, the system preset press will be used. This command checks if the user has enough permissions to delete the specified file. In general, only the owner of the file or the system administrator has this permission. Example removal of No. 1123 in the printing machine HPPrinter Lprm -Phpprinter 1123 Working No. 1011 is removed from the preset printing machine LPRM 1011 Name: fdformat Use permission: All users How to use: fdformat [-n] Device Instructions for use: Low-order formatting for the specified soft disc device. When using this instruction to format the floppy disk, it is best to specify 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. In this case, the user can specify the necessary parameters first with the setFDPRM instruction. parameter: -N Close the confirmation function. This option closes the formatted confirmation step. example: FDFORMAT-N / DEV / FD0H1440 Format the magnetic disk of the disk machine A into a 1.4MB magnetic sheet. And the confirmation step is omitted. Name: MFormat Use permission: All users Use mode: MFORMAT [-T cylinders] [-h heads] [-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_other_tracks] [-1] [-k] Drive: The DOS archive system is established on a magnetic sheet that has been made in low-order formatting. If you open the parameters of the USE_2M when compiling MTools, the partial parameters associated with the 2M format will work. Otherwise these parameters (like S, 2, 1, m) do not act. parameter: -T Magnetic Column-H Head (HEAD) -S-S-DL Label -f -F Label -f The magnetic disc is formatted into FAT32 format, but this parameter is still in the experiment. -I Sets the version number in the FAT32. This is of course still in the experiment. -S magnetic area size code, calculated the number of magnetic regions of the sector = 2 ^ (size code 7) -C magnetne (Cluster). If the given number causes the number of magnets that exceed the FAT table, MFORMAT will automatically enhance the number of magnetic regions. -s -M mouncing magnetic area size. This number is the magnetic area size returned by the system. Usually the same as the actual size. -A If this parameter is added, MFormat generates a set of ATARI systems to this soft disc. -X Format the flop to XDF format. Before use, you must use the XDFCOPY instruction to make a low-order formatting action. -C Generates a disk image file (Disk Image) that can be installed with 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 suitable for the split area of the formatting the hard drive because there is a segmentation table in front of a divided area. This parameter is not tested, it can not be used. -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 the boot magnetic area of this flap or division area. Of course, the hardware parameters are faded. -k Try to maintain the original boot magnetic area. -0 Data transfer rate of data transmission rate -A 0555200 Format is not used using 2M format-1 Example: MFORMAT A: This will use the preset value to format the disk in A: (already / DEV / FD0). Name: MKDOSFS Use permission: All users How to use: MKDOSFS [-C | -L filename] [-f number_of_fats] [-f fat_size] [-i volume_id] [-M message_file] [-R root_dir_entry] [-ss sector_per_cluster] [-V ] Device [block_count] Description: Establish a DOS archive system. Device means that you want to establish a device code for a DOS archive 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. parameter: -c Create a file system before checking there is a bad track. -l reads bad track records from the determined file. -f Specifies the number of FAT, File Allocation Table. The preset value is 2. At present, Linux's FAT archive system does not support more than 2 FAT tables. Usually this doesn't need to be changed. -F Specifies the size of the FAT table, usually 12 or 16 positions. The 12-bit group is usually used for the disks, and the 16-bit component group is used for the general hard disk division area, that is, the so-called FAT16 format. This value typically systematically selects the appropriate value itself. Using FAT16 on the disk usually does not take effect, it is also possible to use FAT12 on the hard disk. -i Specifies the Volume ID. Generally, a number of four-bit tuples, like 2E203A47. If you don't give your system you will be generated. -m When the user tries to boot with this magnetic or divided zone, the system will give the user a warning message to the user when there is no working system. This parameter is used to change this message. You can use the file to edit it, then specify this parameter, or use -m - so the 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 the expanded jumper symbol (Tab) and the wrap symbol (the wrap symbol counts two characters under DOS!) -Not Specifies the Volume Name, Disk label. Like the Format directive under the DOS, you will not give it. There is no preset value. -r Specifies the maximum number of files under the root directory. The so-called number of files here includes the directory. The preset value is 112 or 224 on the floppy disc, 512 on the hard disk. Nothing, don't change this number. -S Magnetic area of each magnetic busner. Must be two times. But unless you know what you are doing, this value should not be gave. -v provides additional messages Example: MKDOSFS-N TESTER / DEV / FD0 Format the disk in the A slot into a DOS format, and set the label to Tester Monicagr published 2004-07-23 13:18 Quote Trackback (0) | Edit comment Comment