📄 ckermit2.txt
字号:
send /bin /as-name:mupeen.zip oofa.zip send oofa.zipBut how does Kermit know when the first "non-switch" is given? It has beentold to look for both a switch and for something else, the data type of thenext field (filename, number, etc). In most cases, this works well. Butconflicts are not impossible. Suppose, for example, in UNIX there was a filenamed "text" in the top-level directory. The command to send it would be: send /textBut C-Kermit would think this was the "/text" switch. To resolve theconflict, use braces: send {/text}or other circumlocutions such as "send //text", "send /./text", etc.The opposite problem can occur if you give an illegal switch that happensto match a directory name. For example: send /f oofa.txtThere is no "/f" switch (there are several switches that begin with "/f",so "/f" is ambiguous). Now suppose there is an "f" directory in the rootdirectory; then this command would be interpreted as: Send all the files in the "/f" directory, giving each one an as-name of "oofa.txt".This could be a mistake, or it could be exactly what you intended; C-Kermithas no way of telling the difference. To avoid situations like this, spellswitches out in full until you are comfortable enough with them to know theminimum abbreviation for each one. Hint: use ? and completion while typingswitches to obtain the necessary feedback.1.5.4. Standard File Selection SwitchesThe following switches are used on different file-oriented commands (such asSEND, DIRECTORY, DELETE, PURGE) to refine the selection of files that matchthe given specification. /AFTER:<date-time> Select only those files having a date-time later than the one given. See Section 1.6 for date-time formats. Synonym: /SINCE. /NOT-AFTER:<date-time> Select only those files having a date-time not later than (i.e. earlier or equal to) the one given. Synonym: /NOT-SINCE. /BEFORE:<date-time> Select only those files having a date-time earlier than the one given. /NOT-BEFORE:<date-time> Select only those files having a date-time not earlier than (i.e. later or equalto) the one given. /DOTFILES UNIX and OS-9 only: The filespec is allowed to match files whose names start with (dot) period. Normally these files are not shown. /NODOTFILES (UNIX and OS-9 only) Don't show files whose names start with dot (period). This is the opposite of /DOTFILES, and is the default. Note that when a directory name starts with a period, the directory and (in recursive operations) all its subdirectories are skipped. /LARGER-THAN:<number> Only select files larger than the given number of bytes. /SMALLER-THAN:<number> Only select files smaller than the given number of bytes. /EXCEPT:pattern Specifies that any files whose names match the pattern, which can be a regular filename, or may contain "*" and/or "?" metacharacters (wildcards), are not to be selected. Example: send /except:*.log *.* sends all files in the current directory except those with a filetype of ".log". Another: send /except:*.~*~ *.* sends all files except the ones that look like Kermit or EMACS backup files (such as "oofa.txt.~17~") (of course you can also use the /NOBACKUP switch for this). The pattern matcher is the same one used by IF MATCH <string> <pattern> (Section 7.4), so you can test your patterns using IF MATCH. If you need to match a literal * or ? (etc), precede it by a backslash (\). If the pattern contains any spaces, it must be enclosed in braces: send /except:{Foo bar} *.* The pattern can also be a list of up to 8 patterns. In this case, the entire pattern must be enclosed in braces, and each sub-pattern must also be enclosed in braces; this eliminates the need for designating a separator character, which is likely to also be a legal filename character on some platform or other, and therefore a source of confusion. You may include spaces between the subpatterns but they are not necessary. The following two commands are equivalent: send /except:{{ck*.o} {ck*.c}} ck*.? send /except:{{ck*.o}{ck*.c}} ck*.? If a pattern is to include a literal brace character, precede it with \. Also note the apparent conflict of this list format and the string-list format described in section 4.9.1. In case you want to include a wildcard string-list with braces on its outer ends as an /EXCEPT: argument, do it like this: send /except:{{{ckuusr.c,ckuus2.c,ckuus6.c}}} ckuus*.c1.5.5. Setting Preferences for Different CommandsCertain oft-used commands offer lots of switches because different peoplehave different requirements or preferences. For example, some people wantto be able to delete files without having to watch a list of the deletedfiles scroll past, while others want to be prompted for permission to deleteeach file. Different people prefer different directory-listing styles. Andso on. Such commands can be tailored with the SET OPTIONS command:SET OPTIONS <command> [ switch [ switch [ ... ] ] ] Sets each switch as the default for the given command, replacing the "factory default". Of course you can also override any defaults established by the SET OPTIONS command by including the relevant switches in the affected command any time you issue it.SHOW OPTIONS Lists the commands that allows option-setting, and the options currently in effect, if any, for each. Switches that have synonyms are shown under their primary name; for example. /LOG and /VERBOSE are shown as /LIST.Commands for which options may be set include DIRECTORY, DELETE, PURGE,and TYPE. Examples: SET OPTIONS DIRECTORY /PAGE /NOBACKUP /HEADING /SORT:DATE /REVERSE SET OPTIONS DELETE /LIST /NOHEADING /NOPAGE /NOASK /NODOTFILES SET OPTIONS TYPE /PAGENot necessarily all of a command's switches can be set as options. Forexample, file selection switches, since these would normally be different foreach command.Put the desired SET OPTIONS commands in your C-Kermit customization file foreach command whose default switches you want to change every time you runC-Kermit.1.6. Dates and TimesSome commands and switches take date-time values, such as: send /after:{8-Feb-2000 10:28:01}Various date-time formats are acceptable. The rules for the date are: . The year must have 4 digits. . If the year comes first, the second field is the month. . The day, month, and year may be separated by spaces, /, -, or underscore. . The month may be numeric (1 = January) or spelled out or abbreviated in English.If the date-time string contains any spaces, it must be enclosed in braces.Examples of legal dates: Interpretation: 2000-Feb-8 8 February 2000 {2000 Feb 8} 8 February 2000 2000/Feb/8 8 February 2000 2000_Feb_8 8 February 2000 2000-2-8 8 February 2000 2000-02-08 8 February 2000 8-Feb-2000 8 February 2000 08-Feb-2000 8 February 2000 12/25/2000 25 December 2000 25/12/2000 25 December 2000The last two examples show that when the year comes last, and the month isgiven numerically, the order of the day and month doesn't matter as long asthe day is 13 or greater (mm/dd/yyyy is commonly used in the USA, whereasdd/mm/yyyy is the norm in Europe). However: 08/02/2000 Is ambiguous and therefore not accepted.If a date is given, the time is optional and defaults to 00:00:00. If thetime is given with a date, it must follow the date, separated by space, /, -,or underscore, and with hours, minutes, and seconds separated by colon (:).Example: 2000-Feb-8 10:28:01 Represents 8 February 2000, 10:28:01amIf a date is not given, the current date is used and a time is required.Time format is hh:mm:ss or hh:mm or hh in 24-hour format, or followed by "am"or "pm" (or "AM" or "PM") to indicate morning or afternoon. Examples of timesthat are acceptable: Interpretation: 3:23:56 3:23:56am 3:23:56am 3:23:56am 3:23:56pm 3:23:56pm = 15:23:56 15:23:56 3:23:56pm = 15:23:56 3:23pm 3:23:00pm = 15:23:00 3:23PM 3:23:00pm = 15:23:00 3pm 3:00:00pm = 15:00:00Examples of legal date-times: send /after:{8 Feb 2000 10:28:01} send /after:8_Feb_2000_10:28:01 send /after:8-Feb-2000/10:28:01 send /after:2000/02/08/10:28:01 send /after:2000/02/08_10:28:01 send /after:2000/02/08_10:28:01am send /after:2000/02/08_10:28:01pm send /after:2000/02/08_10:28pm send /after:2000/02/08_10pm send /after:10:00:00pm send /after:10:00pm send /after:10pm send /after:22Finally, there is a special all-numeric format you can use: yyyymmdd hh:mm:ssFor example: 20000208 10:28:01This is Kermit's standard date-time format (based on ISO 8601), and isaccepted (among other formats) by any command or switch that requires adate-time, and is output by any function whose result is a calendar date-time.There are no optional parts to this format and it must be exactly 17characters long, punctuated as shown (except you can substitute underscorefor space in contexts where a single "word" is required). The time is in24-hour format (23:00:00 is 11:00pm). This is the format returned by\fdate(filename), so you can also use constructions like this: send /after:\fdate(oofa.txt)which means "all files newer than oofa.txt".Besides explicit dates, you can also use the any of the following shortcuts:TODAY Stands for the current date at 00:00:00.TODAY 12:34:56 Stands for the current date at the given time.YESTERDAY Stands for yesterday's date at 00:00:00. A time may also be given.TOMORROW Stands for tomorrow's date at 00:00:00. A time may also be given.+ <number> { DAYS, WEEKS, MONTHS, YEARS } [ time ] Is replaced by the future date indicated, relative to the current date. If the time is omitted, 00:00:00 is used. Examples: +3days, +2weeks, +1year, +37months.- <number> { DAYS, WEEKS, MONTHS, YEARS } [ time ] Is replaced by the past date indicated, relative to the current date. If the time is omitted, 00:00:00 is used.The time can be separated from the date shortcut by any of the same separatorsthat are allowed for explicit date-times: space, hyphen, slash, period, orunderscore. In switches and other space-delimited fields, use non-spacesto separate date/time fields, or enclose the date-time in braces, e.g.: purge /before:-4days_12:00:00or: purge /before:{- 4 days 12:00:00}Of course you can also use variables: define \%n 43 purge /before:-\%ndays_12:00:00Shortcut names can be abbreviated to any length that still distinguishes themfrom any other name that can appear in the same context, e.g. "TOD" for today,"Y" for yesterday. Also, the special abbreviation "wks" is accepted forWEEKS, and "yrs" for "YEARS".(To see how to specify dates relative to a specific date, rather than thecurrent one, see the \fmjd() function description below.)You can check date formats with the DATE command. DATE by itself prints thecurrent date and time in standard format: yyyymmdd hh:mm:ss. DATE followed bya date and/or time (including shortcuts) converts it to standard format if itcan understand it, otherwise it prints an error message.The following variables and functions deal with dates and times; any functionargument designated as "date-time" can be in any of the formats describedabove.\v(day) The first three letters of the English word for the current day of the week, e.g. "Wed".\fday(date-time) The first three letters of the English word for day of the week of the given date. If a time is included, it is ignored. Example: \fday(8 Feb 1988) = "Mon".\v(nday) The numeric day of the week: 0 = Sunday, 1 = Monday, ..., 6 = Saturday.\fnday(date-time)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -