Name: / etc / aliases
Use permission: System managers
How to use: please update your database with newaliases
Description:
Sendmail uses an action that is converted by the user name 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 ...]
Description:
Mail is just a directive, Mail is also an email program, but people who use Mail to read the letter should be very small! For system managers, Mail is useful, because managers can write to Script with Mail, regularly send some memorandum of reminder systems.
parameter:
i ignore the interrupt signal of TTY. (Interrupt)
I forced set into interactive mode. (Interactive)
v prints the message, such as the location of the send letter, state, and the like. (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 permission: 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 settings, modification is not allowed to pass on the terminal interface: MESG N Directives related to MESG are: Talk, Write, Wall. Name: / etc / aliases Use permission: System managers How to use: newaliases Note: Sendmail uses an action that is converted by the user name 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 permission: All users Use mode: Talk Person [TTYNAME] Description: Talk to other users Tie count: Person: The user account for the interpretation, if the user can enter Person@machine.name on other machines TTYNAME: 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, and Rolland has only one connection: Talk Rolland The next step is to respond, if rollaend accepts, RollaEnd Enter the `Talk Jzlee`, you 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 Enter the `Talk Jzlee @ JZLE.HOME`, you 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 permission: All users Use mode: Wall [Message] Instructions for use: Wall transmits the message to each MESG to be set 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 permission: All users Use mode: Write user [TTYNAME] Description: Communication to other users Tie count: User: User account for preparing message TTYNAME: If the user has more than two TTY connectors, you can choose the right TTY message. Example. 1: The news is given to Rolland, and the 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 is to 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 permission: All users Use mode: Kill [-siGnal | -p] [-a] PID ... Kill -l [Signal] Description: KILL sends a specific signal (Signal) to the stroke of the stroke ID, as a specific action based on this signal, if not specified, the preset is a signal to be terminated (TERM) Put on -S (Signal): Among them, the signals are HUP (1), KILL (9), TERM (15), which represents heavy run, cut off, end; detailed signals can be used with kill -l -p: Print PID, does not send the signal -L (Signal): List all available signal names example: Cut the PID 323 stroke (kill): KILL-9 323 Running the PID 456 (Restart): Kill-Hup 456 Name: Nice Use permission: 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 an increase in Adjustment to this original priority? --help display help message --Version Display Version Information example: Put the priority of the LS 1 and execute: Nice -n 1 ls Add 10 priority to 10 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 Use permission: All users How to use: ps [options] [--help] Description: Show the dynamics of the moment parameter: There are a lot of PS parameters, and only several common parameters are listed here and -A lists all itinerary -W Display widened can display more information -au shows more detailed information -AUX shows all strokes that contain other users Au (x) output format: User PID% CPU% MEM VSZ RSS TTY Stat Start Time Command User: Tour owner PID: PID % CPU: Used CPU usage % MEM: Occupation Memory Use VSZ: The size of the virtual memory occupied RSS: The size of the memory TTY: The secondary device number of the terminal (Minor Device Number Of TTY) Stat: The status of this trip: D: I / O action in uninterrupted still (通 □ □ 缜 B) R: is being executed S: Static state T: Pause Z: No existence but temporarily unable to eliminate W: There is not enough memory paging to allocate <: High priority stroke N: low priority stroke L: There is a memory paging assignment and lock in memory (instant system or A I / O) START: Time of the trip Time: Time to do Command: Example of the instruction performed: 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: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 permission: All users Use mode: 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 PID (if there is specified) or in init this basic stroke (root), if there is a specified user ID, the tree map will only display The trip owned by the user parameter: -a Displays the full instructions and parameters of the itinerary, if it is replaced by the memory body, add parentheses -c If there is a rebounded stroke name, it 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 -C INIT - - AMD | -apmd | -ATD | -HTTPD - - HTTPD | | | -HTTPD | | | -HTTPD | | | -HTTPD .... Name: renice Use permission: 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 priority of the Id of the stroke to PID -g PGRP re-specifies the priority of the ID of the stroke group (one or more) of PGRP (one or more) -u User re-specifies priority for the stroke owner for the User example: Plus the stroke ID of 987 and 32 and the priority number of the stroke owner is Daemon and root plus 1: RENICE 1 987 -U daemon root -p 32 Note: Each trorate has a unique ID Name: TOP Use permission: 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 S in the Trolver Command Column (Interactive Command) Q: There is no delayed display speed. If the user has the permissions of superuser, the TOP will perform C: switching display mode with the highest priority, one has two modes, one is only the name of the execution file, the other The species is the complete path and the name S: accumulation mode, the CPU Time of the DEAD CHILD Process, which will complete or disappear. S: Safety mode, cancel the conversation instruction, avoid potential crisis i: No idle (IDLE) or useless (Zombie) stroke N: Update the number of times, will exit TOP after completion B: Batch file mode, with "N" parameters, can be used to output the result of TOP to the file example: Show out ten times after ten times; TOP-N 10 The user 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 in some systems Winch ignores 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 programs on the PTY device Skill -kill -v PTS / * 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 THISATSTFORMELA 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 about T.E.S.T THIS MAN MAN Test e ### 4. Replace strings Shell >> Tr -s "this" "test" THIS Test TH TE Directive: CLEAR Uses: 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 Display the terminal category on the screen, but do not make the set action. This command can be used to achieve the category of the current terminal. -e ch Set the ERASE unit into CH -i ch Set the interrupt character to CH -k ch Will delete a line of characters set to Ch -I Don't do settings, if you don't use the option -Q, the current value of Erase, interrupts and delete characters will still be sent to the screen. -Q Do not display ERASE, interrupt and delete the value of the character to the screen. -r Print the terminal machine class on the screen. -S Send the type of command to the setting TERM to the terminal, usually used in .login or .profile example: Let the user enter a terminal model and set the terminal to the type other preset state. # RESET? Set the ERASE character set Control-h # RESET -E ^ B Display the string of the 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 ...] Description: Compress is a fairly ancient UNIX file compression instruction. The compressed file will add a .z extended file name to distinguish uncompressed files, compressed files 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. parameter: C Output results to standard output equipment (general refers to the screen) F forced writing to the file, if the destination already exists, it will be overwritten (Force) v The message executed by the program on the screen (Verbose) b Set the upper limit of the number of common strings, calculate with bit yuan, can set the value of 9 to 16 bits. Due to the larger value, the more common strings that can be used, the greater the compression ratio, so the preset value of 16 bits (bits) is generally used. D decompress the compressed file V list publication 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 - Display the work usage of unfinished lists in the listing machine LPQ [L] [P] [User] Description 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 How to use: lpr [-pprinter] During the data sent by the standard input to the printing machine, the printing machine management program LPD will be given to the appropriate program or device processing later. 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 printing machine LP. lpr-plp www.c kkk.c Name: lprm - Remove the usage by a work by the print machine / 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. 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 Remove Work 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_THER_TRACKS] [-1] [-k] Drive: Have a low order Formatted magnetic sheets establish a DOS archive system. 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 (Synlider) -H head (HEAD) -S number of magnetic regions per magnetic -l tag -F The formatted magnetic disc is formatted to FAT32, 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, calculation mode for sector = 2 ^ (size code 7) -C Magnetic bush (Cluster) of the magnetic area. If the given number causes the number of magnets that exceed the FAT table, MFORMAT will automatically amplify the number of magnetic regions. -S -M Software 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 The size of the -R root directory, the 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 the 0th rail -A Data transfer rate outside the track -2 use 2M format -1 Do not use 2M format 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] [-n volume_name] [-r root_dir_entry?] [-s 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 - This 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 unfolded jumper symbol (Tab) and the wrap symbol (the wrap symbol counts two characters under DOS!) -n Specifies Volume Name, which is a 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