Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 187 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
187
Dung lượng
870 KB
Nội dung
■ the -r option is specified and no version requirements are found; ■ neither the -d nor -r option is specified and no version definitions or version requirements are found. See attributes(5) for descriptions of the following attributes: ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWtoo ld(1), ldd(1), strip(1), elf(3ELF), attributes(5) Linker and Libraries Guide pvs(1) ATTRIBUTES SEE ALSO User Commands 1227 pwd – return working directory name /usr/bin/pwd pwd writes an absolute path name of the current working directory to standard output. Both the Bourne shell, sh(1), and the Korn shell, ksh(1), also have a built-in pwd command. See environ(5) for descriptions of the following environment variables that affect the execution of pwd: LC_MESSAGES and NLSPATH. The following exit values are returned: 0 Successful completion. >0 An error occurred. If an error is detected, output will not be written to standard output, a diagnostic message will be written to standard error, and the exit status will not be 0. See attributes(5) for descriptions of the following attributes: ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWcsu CSI enabled cd(1), ksh(1), sh(1), shell_builtins(1), attributes(5), environ(5) ‘‘Cannot open ’’ and ‘‘Read error in ’’ indicate possible file system trouble and should be referred to a UNIX system administrator. If you move the current directory or one above it, pwd may not give the correct response. Use the cd(1) command with a full path name to correct this situation. pwd(1) NAME SYNOPSIS DESCRIPTION ENVIRONMENT VARIABLES EXIT STATUS ATTRIBUTES SEE ALSO DIAGNOSTICS NOTES 1228 man pages section 1: User Commands • Last Revised 28 Mar 1995 ranlib – convert archives to random libraries /usr/ccs/bin/ranlib archive The ranlib utility was used in SunOS 4.x to add a table of contents to archive libraries, which converted each archive to a form that could be linked more rapidly. This is no longer needed, as the ar(1) command automatically provides all the functionality ranlib used to provide. This script is provided as a convenience for software developers who need to maintain Makefiles that are portable across a variety of operating systems. ranlib has exit status 0. See attributes(5) for descriptions of the following attributes: ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWbtool ar(1), ar(3HEAD), attributes(5) ranlib(1) NAME SYNOPSIS DESCRIPTION EXIT STATUS ATTRIBUTES SEE ALSO User Commands 1229 rcp – remote file copy rcp [-p] filename1 filename2 rcp [-pr] filename… directory The rcp command copies files between machines. Each filename or directory argument is either a remote file name of the form: hostname:pathor a local file name (containing no ":" (colon) characters, or "/" (backslash) before any ":" (colon) characters). The hostname can be an IPv4 or IPv6 address string. See inet(7P) and inet6(7P). Since IPv6 addresses already contain colons, the hostname should be enclosed in a pair of square brackets when an IPv6 address is used. Otherwise, the first occurrence of a colon can be interpreted as the separator between hostname and path. For example, [1080::8:800:200C:417A]:tmp/file If a filename is not a full path name, it is interpreted relative to your home directory on hostname.Apath on a remote host may be quoted using \ , " ,or’ , so that the metacharacters are interpreted remotely. rcp does not prompt for passwords; your current local user name must exist on hostname and allow remote command execution by rsh(1). rcp handles third party copies, where neither source nor target files are on the current machine. Hostnames may also take the form username@hostname:filenameto use username rather than your current local user name as the user name on the remote host. rcp also supports Internet domain addressing of the remote host, so that: username@host.domain:filenamespecifies the username to be used, the hostname, and the domain in which that host resides. File names that are not full path names will be interpreted relative to the home directory of the user named username, on the remote host. The following options are supported: -p Attempts to give each copy the same modification times, access times, modes, and ACLs if applicable as the original file. -r Copies each subtree rooted at filename; in this case the destination must be a directory. See largefile(5) for the description of the behavior of rcp when encountering files greater than or equal to 2 Gbyte ( 2 31 bytes). The rcp command is IPv6–enabled. See ip6(7P). rcp(1) NAME SYNOPSIS DESCRIPTION OPTIONS USAGE 1230 man pages section 1: User Commands • Last Revised 6 Nov 2000 $HOME/.profile See attributes(5) for descriptions of the following attributes: ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWrcmdc CSI Enabled cpio(1), ftp(1), rlogin(1), rsh(1), setfacl(1), tar(1), hosts.equiv(4), attributes(5), largefile(5), inet(7P), inet6(7P), ip6(7P) rcp is meant to copy between different hosts; attempting to rcp a file onto itself, as with: example% rcp tmp/file myhost:/tmp/fileresults in a severely corrupted file. rcp may not correctly fail when the target of a copy is a file instead of a directory. rcp can become confused by output generated by commands in a $HOME/.profile on the remote host. rcp requires that the source host have permission to execute commands on the remote host when doing third-party copies. rcp does not properly handle symbolic links. Use tar or cpio piped to rsh to obtain remote copies of directories containing symbolic links or named pipes. See tar(1) and cpio(1). If you forget to quote metacharacters intended for the remote host, you will get an incomprehensible error message. rcp will fail if you copy ACLs to a file system that does not support ACLs. rcp is CSI-enabled except for the handling of username, hostname, and domain. rcp(1) FILES ATTRIBUTES SEE ALSO NOTES User Commands 1231 rdist – remote file distribution program rdist [-b] [-D] [-h] [-i] [-n] [-q] [-R] [-v] [-w] [-y] [-d macro = value] [-f distfile] [-m host]… rdist [-b] [-D] [-h] [-i] [-n] [-q] [-R] [-v] [-w] [-y] -c pathname… [login @] hostname [: destpath] The rdist utility maintains copies of files on multiple hosts. It preserves the owner, group, mode, and modification time of the master copies, and can update programs that are executing. (Note: rdist does not propagate ownership or mode changes when the file contents have not changed.) Normally, a copy on a remote host is updated if its size or modification time differs from the original on the local host. (With the -y option (younger mode), only the modification times are checked, not the size. See OPTIONS below.) There are two forms of the rdist command. In the first form shown in the SYNOPSIS section above, rdist reads the indicated distfile for instructions on updating files and/or directories. If distfile is ‘−’, the standard input is used. If no -f option is present, rdist first looks in its working directory for distfile, and then for Distfile, for instructions. The second form shown in SYNOPSIS uses the -c option and specifies paths as command line options. In order to be able to use rdist across machines, each host machine must have a /etc/host.equiv file, or the user must have an entry in the .rhosts file in the home directory. See hosts.equiv(4) for more information. The following options are supported: -b Binary comparison. Performs a binary comparison and updates files if they differ, rather than merely comparing dates and sizes. -c pathname [login @]hostname[:destpath ] Copies each pathname to the named host; if destpath is specified, it will not update any pathname on the named host. (Relative filenames are taken as relative to your home directory.) If the ‘login @’ prefix is given, the update is performed with the user ID of login.Ifthe‘:destpath’ is given, the remote file is installed as that pathname. -d macro=value Defines macro to have value. This option is used to define or override macro definitions in the distfile. value can be the empty string, one name, or a list of names surrounded by parentheses and separated by white space. -D Enables debugging. rdist(1) NAME SYNOPSIS DESCRIPTION OPTIONS 1232 man pages section 1: User Commands • Last Revised 6 Nov 2000 -f distfile Uses the description file distfile.A‘−’ as the distfile argument denotes the standard input. -h Follows symbolic links. Copies the file that the link points to rather than the link itself. -i Ignores unresolved links. rdist will normally try to maintain the link structure of files being transferred and warn the user if all the links cannot be found. -m host Limits which machines are to be updated. Multiple -m arguments can be given to limit updates to a subset of the hosts listed in the distfile. -n Prints the commands without executing them. This option is useful for debugging a distfile. -q Quiet mode. Does not display the files being updated on the standard output. -R Removes extraneous files. If a directory is being updated, removes files on the remote host that do not correspond to those in the master (local) directory. This is useful for maintaining truly identical copies of directories. -v Verifies that the files are up to date on all the hosts. Any files that are out of date are displayed, but no files are updated, nor is any mail sent. -w Whole mode. The whole file name is appended to the destination directory name. Normally, only the last component of a name is used when renaming files. This preserves the directory structure of the files being copied, instead of flattening the directory structure. For instance, renaming a list of files such as dir1/dir2 to dir3 would create files dir3/dir1 and dir3/dir2 instead of dir3 and dir3. When the -w option is used with a filename that begins with ~, everything except the home directory is appended to the destination name. -y Younger mode. Does not update remote copies that are younger than the master copy, but issues a warning message instead. Only modification times are checked. No comparison of size is made. NEWLINE, TAB, and SPACE characters are all treated as white space; a mapping continues across input lines until the start of the next mapping: either a single filename followed by a ‘->’ or the opening parenthesis of a filename list. Comments begin with # and end with a NEWLINE. rdist(1) White Space Characters Comments User Commands 1233 The distfile contains a sequence of entries that specify the files to be copied, the destination files to be copied, the destination hosts, and what operations to perform to do the updating. Each entry has one of the following formats: variable_name ’=’ name_list [ label: ] source_list ’->’ destination_list command_list [ label: ] source_list ’::’ time_stamp_file command_list The first format is used for defining variables. The second format is used for distributing files to other hosts. The third format is used for making lists of files that have been changed since some given date. The source list specifies a list of files and/or directories on the local host that are to be used as the master copy for distribution. The destination list is the list of hosts to which these files are to be copied. Each file in the source list is added to a list of changes if the file is out of date on the host that is being updated (second format) or if the file is newer than the time stamp file (third format). Labels are optional. They are used to identify a command for partial updates. The colon (:) is used after an optional label, while the double colon (::) is used for making lists of files that have been changed since a certain date (specified by the date/time of the time_stamp file). Typically, only notify is used with the ’::’ format of the command line. rdist has a limited macro facility. Macros are only expanded in filename or hostname lists, and in the argument lists of certain primitives. Macros cannot be used to stand for primitives or their options, or the ‘->’ or ‘::’ symbols. A macro definition is a line of the form: macro = value A macro reference is a string of the form: ${macro} although (as with make(1S)) the braces can be omitted if the macro name consists of just one character. The shell meta-characters: [, ], {, }, * and ? are recognized and expanded (on the local host only) just as they are with csh(1). Metacharacters can be escaped by prepending a backslash. The ~ character is also expanded in the same way as with csh; however, it is expanded separately on the local and destination hosts. File names that do not begin with ‘ / ’ or ‘ ~ ’ are taken to be relative to user’s home directory on each destination host; they are not relative to the current working directory. Multiple file names must be enclosed within parentheses. The following primitives can be used to specify actions rdist is to take when updating remote copies of each file. rdist(1) Distfiles Macros Metacharacters Filenames Primitives 1234 man pages section 1: User Commands • Last Revised 6 Nov 2000 install [-b][-h][-i][-R][-v][-w][-y][newname] Copy out of date files and directories (recursively). If no newname operand is given, the name of the local file is given to the remote host’s copy. If absent from the remote host, parent directories in a filename’s path are created. To help prevent disasters, a non-empty directory on a target host is not replaced with a regular file or a symbolic link by rdist. However, when using the -R option, a non-empty directory is removed if the corresponding filename is completely absent on the master host. The options for install have the same semantics as their command line counterparts, but are limited in scope to a particular map. The login name used on the destination host is the same as the local host unless the destination name is of the format login@host. In that case, the update is performed under the username login. notify address . . . Send mail to the indicated email address of the form: user@host that lists the files updated and any errors that may have occurred. If an address does not contain a ‘@host ’ suffix, rdist uses the name of the destination host to complete the address. except filename . . . Omit from updates the files named as arguments. except_pat pattern . . . Omit from updates the filenames that match each regular-expression pattern (see ed(1) for more information on regular expressions). Note that ‘\’ and ‘$’ characters must be escaped in the distfile. Shell variables can also be used within a pattern, however shell filename expansion is not supported. special [filename] "command-line " Specify a Bourne shell, sh(1) command line to execute on the remote host after each named file is updated. If no filename argument is present, the command-line is performed for every updated file, with the shell variable FILE set to the file’s name on the local host. The quotation marks allow command-line to span input lines in the distfile; multiple shell commands must be separated by semicolons (;). The default working directory for the shell executing each command-line is the user’s home directory on the remote host. The rdist command is IPv6–enabled. See ip6(7P). EXAMPLE 1 A sample distfile The following sample distfile instructs rdist to maintain identical copies of a shared library, a shared-library initialized data file, several include files, and a directory, on hosts named hermes and magus.Onmagus, commands are executed as super-user. rdist(1) IPv6 EXAMPLES User Commands 1235 EXAMPLE 1 A sample distfile (Continued) rdist notifies merlin@druid whenever it discovers that a local file has changed relative to a timestamp file. (Parentheses are used when the source or destination list contains zero or more names separated by white-space.) HOSTS = ( hermes root@magus ) FILES = ( /usr/local/lib/libcant.so.1.1 /usrlocal/lib/libcant.sa.1.1 /usr/local/include/{*.h} /usr/local/bin ) (${FILES}) -> (${HOSTS}) install −R; ${FILES} :: /usr/local/lib/timestamp notify merlin@druid ; ~/.rhosts user’s trusted hosts and users /etc/host.equiv system trusted hosts and users /tmp/rdist* temporary file for update lists See attributes(5) for descriptions of the following attributes: ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWrcmdc csh(1), ed(1), make(1S), sh(1), stat(2), hosts.equiv(4), attributes(5), ip6(7P) A complaint about mismatch of rdist version numbers may really stem from some problem with starting your shell, for example, you are in too many groups. The super-user does not have its accustomed access privileges on NFS mounted file systems. Using rdist to copy to such a file system may fail, or the copies may be owned by user “nobody”. Source files must reside or be mounted on the local host. There is no easy way to have a special command executed only once after all files in a directory have been updated. Variable expansion only works for name lists; there should be a general macro facility. rdist aborts on files that have a negative modification time (before Jan 1, 1970). There should be a “force” option to allow replacement of non-empty directories by regular files or symlinks. A means of updating file modes and owners of otherwise identical files is also needed. rdist(1) FILES ATTRIBUTES SEE ALSO DIAGNOSTICS WARNINGS BUGS 1236 man pages section 1: User Commands • Last Revised 6 Nov 2000 [...]... operands or just the user argument as users If a user exists with a user name equal to the operand, then the user ID of that user will be used in further processing Otherwise, if the operand represents an unsigned decimal integer, it will be used as the numeric user ID of the user The following operands are supported: ID priority EXAMPLES A process ID, process group ID or user name /user ID, depending... IDs 98 7 and 32 would have a lower scheduling priority: example% renice -n 5 -p 98 7 32 EXAMPLE 2 Adjusting the scheduling priority of group IDs Adjust the system scheduling priority so that group IDs 324 and 76 would have a higher scheduling priority, if the user has the appropriate privileges to do so: example% renice -n -4 -g 324 76 EXAMPLE 3 Adjusting the scheduling priority of a user ID and user. .. (that is, sed, grep, awk, ed, and so forth) regex with the -e option forces subsequent commands to be ignored In other words, if a backquoted statement appears as follows: ‘regex -e ; command1 ; command2 ‘ command1 and command2 would never be executed However, dividing the expression into two: ‘regex -e ‘ command1 ; command2 ‘ would yield the desired result ATTRIBUTES See attributes(5) for descriptions... regcmp output, regex(abc,line) applies the regular expression named abc to line Diagnostics are self-explanatory EXAMPLE 1 Examples of the regcmp command name "([A−Za−z][A−Za−z0 9_ ]*)$0" telno " \({0,1}([2 9] [01][1 9] )$0\){0,1} *" "([2 9] [0 9] {2})$1[ −]{0,1}" "([0 9] {4})$2" The three arguments to telno shown above must all be entered on one line In the C program that uses the regcmp output, regex(telno,... following attributes: man pages section 1: User Commands • Last Revised Dec 20 199 6 regcmp(1) ATTRIBUTE TYPE ATTRIBUTE VALUE Availability CSI SEE ALSO SUNWtoo Enabled regcmp(3C), attributes(5), environ(5) User Commands 1245 regex(1F) NAME SYNOPSIS DESCRIPTION regex – match patterns against a string regex [-e] [-v "string"] [pattern template] … pattern [template] The regex command takes a string from the standard... valid=‘regex -v "$F5" ’^[0 -9] +$’‘ EXAMPLE 3 Translating an environment variable in a form In a form, to translate an environment variable which contains one of the numbers 1, 2, 3, 4, 5 to the letters a, b, c, d, e: value=‘regex -v "$VAR1" 1 a 2 b 3 c 4 d 5 e ’.*’ ’Error’‘ Note the use of the pattern ’.*’ to mean "anything else" 1246 man pages section 1: User Commands • Last Revised 12 Jul 199 9 regex(1F) EXAMPLE... Process Priority OPTIONS Users other than the privileged user may only alter the priority of processes they own, and can only monotonically increase their “nice value” within the range 0 to 19 This prevents overriding administrative fiats The privileged user may alter the priority of any process and set the priority to any value in the range −20 to 19 Useful priorities are: 19 (the affected processes... separated by a space An entry in a remote user s rhosts file permits the user named username who is logged into hostname to log in to the remote machine as the remote user without supplying a password If the name of the local host is not found in the /etc/hosts.equiv file on the remote machine, and the local username and hostname are not found in the remote user s rhosts file, then the remote machine... disconnect from the remote host -E Stop any character from being recognized as an escape character -l username Specify a different username for the remote login If you do not use this option, the remote username used is the same as your local username -L Allow the rlogin session to be run in “litout” mode User Commands 1253 rlogin(1) Escape Sequences Lines that you type which start with the tilde character... SYNOPSIS renice [-n increment] [-i idtype] ID… renice [-n increment] [-g | -p | -u]ID… renice priority [-p] pid… [-g gid…] [-p pid…] [-u user ] renice priority -g gid… [-g gid…] [-p pid…] [-u user ] renice priority -u user [-g gid…] [-p pid…] [-u user ] DESCRIPTION The renice command alters the scheduling priority of one or more running processes By default, the processes to be affected are specified by their . Examples of the regcmp command. name "([A−Za−z][A−Za−z0 9_ ]*)$0" telno " ({0,1}([2 9] [01][1 9] )$0){0,1} *" "([2 9] [0 9] {2})$1[ −]{0,1}" "([0 9] {4})$2" The. section 1: User Commands • Last Revised 28 Mar 199 5 ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWcsu csh(1), ksh(1), line(1), set(1), sh(1), attributes(5), environ(5) read(1) SEE ALSO User Commands. pages section 1: User Commands • Last Revised Dec 20 199 6 ATTRIBUTE TYPE ATTRIBUTE VALUE Availability SUNWtoo CSI Enabled regcmp(3C), attributes(5), environ(5) regcmp(1) SEE ALSO User Commands 1245 regex