Z/OS V1R12.0 UNIX System Services Command Reference

z/OS

UNIX System Services Command Reference

SA22-7802-13

Note: Before using this information and the product it supports, be sure to read the general information under "Notices" on page 981.

This edition applies to version 1 release 13 modification 0 of IBM z/OS (product number 5694-A01) and to all subsequent releases and modifications until otherwise indicated in new editions. This edition replaces SA22-7802-13. ? Copyright IBM Corporation 1996, 2011. US Government Users Restricted Rights ? Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Contents

Figures . . . . . . . . . . . . . . . ix

Tables . . . . . . . . . . . . . . . xi

About this document . . . . . . . . xiii

Using this document . . . . . . . . . . . xiii Where to find more information . . . . . . . xiii

How to send your comments to IBM xvii

If you have a technical problem . . . . . . . xvii

Summary of changes . . . . . . . . xix

Changes made in z/OS Version 1 Release 13 . . . xix Changes made in z/OS Version 1 Release 12 . . . xix Changes made in z/OS Version 1 Release 11, as updated April 2010 . . . . . . . . . . . . xx Changes made in z/OS Version 1 Release 11 . . . xx

Chapter 1. Introduction to shell commands and DBCS. . . . . . . . . 1

Reading the command descriptions . . . . . . . 1 Using the double-byte character set (DBCS) . . . . 6

Chapter 2. Shell command descriptions 11

alias -- Display or create a command alias . . . . 11 amblist -- Display formatted information from object and executable files for diagnostic purposes . 14 ar -- Create or maintain library archives . . . . 16 as -- Use the HLASM assembler to produce object files . . . . . . . . . . . . . . . . . 19 asa -- Interpret ASA/FORTRAN carriage control. . 23 at -- Run a command at a specified time . . . . 24 autoload -- Indicate function name not defined . . 27 automount -- Configure the automount facility . . 27 awk -- Process programs written in the awk language . . . . . . . . . . . . . . . 34 basename -- Return the nondirectory components of a path name . . . . . . . . . . . . . 51 batch -- Run commands when the system is not busy . . . . . . . . . . . . . . . . . 51 bc -- Use the arbitrary-precision arithmetic calculation language . . . . . . . . . . . 52 bg -- Move a job to the background . . . . . . 68 bpxmtext -- Display reason code text . . . . . 69 bpxtrace -- Activate or deactivate traces for processes . . . . . . . . . . . . . . . 70 break -- Exit from a loop in a shell script . . . . 75 c++ -- Compile C and C++ source code, link-edit and create an executable file . . . . . . . . . 75 c89 -- Compiler invocation using host environment variables . . . . . . . . . . . . . . . 76 c99 -- Compile C source code, link-edit and create an executable file . . . . . . . . . . . . 115 cal -- Display a calendar for a month or year . . 115

? Copyright IBM Corp. 1996, 2011

calendar -- Display all current appointments . . . 116 cancel -- Cancel print queue requests (stub command) . . . . . . . . . . . . . . 117 captoinfo -- Print the terminal entries in the terminfo database . . . . . . . . . . . . 118 cat -- Concatenate or display text files . . . . . 119 cc -- Compile C source code, link-edit and create an executable file . . . . . . . . . . . . 121 cd -- Change the working directory . . . . . . 121 ceebldtx -- Transform message source files into assembler source files . . . . . . . . . . 123 chaudit -- Change audit flags for a file. . . . . 126 chcp -- Set or query ASCII/EBCDIC code pages for the terminal. . . . . . . . . . . . . 128 chgrp -- Change the group owner of a file or directory . . . . . . . . . . . . . . . 131 chlabel -- Set the security label of files and directories . . . . . . . . . . . . . . 132 chmod -- Change the mode of a file or directory 134 chmount -- Change the mount attributes of a file system . . . . . . . . . . . . . . . 137 chown -- Change the owner or group of a file or directory . . . . . . . . . . . . . . . 138 chroot -- Change the root directory for the execution of a command . . . . . . . . . 140 chtag -- Change file tag information . . . . . 142 cksum -- Calculate and display checksums and byte counts . . . . . . . . . . . . . . 145 clear -- Clear the screen of all previous output . . 146 cmp -- Compare two files . . . . . . . . . 147 col -- Remove reverse line feeds . . . . . . . 148 : (colon) -- Do nothing, successfully . . . . . 150 comm -- Show and select or reject lines common to two files . . . . . . . . . . . . . . 151 command -- Run a simple command . . . . . 152 compress -- Lempel-Ziv file compression . . . . 153 confighfs -- Invoke the vfs_pfsctl function for HFS file systems . . . . . . . . . . . . . . 155 configstk -- Configure the AF_UEINT stack . . . 157 configstrm -- Set and query the STREAMS physical file system configuration . . . . . . 159 continue -- Skip to the next iteration of a loop in a shell script . . . . . . . . . . . . . . 160 copytree -- Make a copy of a file hierarchy while preserving all file attributes . . . . . . . . 160 cp -- Copy a file . . . . . . . . . . . . 162 cpio -- Copy in/out file archives . . . . . . . 175 cron daemon -- Run commands at specified dates and times . . . . . . . . . . . . . . 178 crontab -- Schedule regular background jobs . . . 181 csplit -- Split text files . . . . . . . . . . 183 ctags -- Create tag files for ex, more, and vi . . . 186 cu -- Call up another system (stub only) . . . . 188 cut -- Cut out selected fields from each line of a file . . . . . . . . . . . . . . . . . 188

iii

cxx -- Compile C and C++ source code, link-edit and create an executable file . . . . . . . . 190 date -- Display the date and time . . . . . . 190 dbgld -- Create a module map for debugging . . 193 dbx -- Use the debugger . . . . . . . . . 195 dbx subcommands . . . . . . . . . . . 200 dd -- Convert and copy a file . . . . . . . . 243 df -- Display the amount of free space in the file system . . . . . . . . . . . . . . . 247 diff -- Compare two text files and show the differences . . . . . . . . . . . . . . 249 dircmp -- Compare directories . . . . . . . 253 dirname -- Return the directory components of a path name . . . . . . . . . . . . . . 254 . (dot) -- Run a shell file in the current environment. . . . . . . . . . . . . . 255 dspcat -- Display all or part of a message catalog 256 dspmsg -- Display selected messages from message catalogs . . . . . . . . . . . . 257 du -- Summarize usage of file space . . . . . 258 echo -- Write arguments to standard output . . . 259 ed -- Use the ed line-oriented text editor . . . . 260 edcmtext -- Display errnojr reason code text . . . 269 egrep -- Search a file for a specified pattern . . . 270 env -- Display or set environment variables for a process . . . . . . . . . . . . . . . 270 eval -- Construct a command by concatenating arguments . . . . . . . . . . . . . . 271 ex -- Use the ex text editor. . . . . . . . . 273 exec -- Run a command and open, close, or copy the file descriptors. . . . . . . . . . . . 275 exit -- Return to the shell's parent process or to TSO/E . . . . . . . . . . . . . . . 276 expand -- Expand tabs to spaces . . . . . . . 277 export -- Set a variable for export . . . . . . 278 expr -- Evaluate arguments as an expression . . . 280 exrecover daemon -- Retrieve vi and ex files . . . 282 extattr -- Set, reset, and display extended attributes for files . . . . . . . . . . . . 285 false -- Return a nonzero exit code . . . . . . 287 fc -- Process a command history list . . . . . 287 fg -- Bring a job into the foreground . . . . . 290 fgrep -- Search a file for a specified pattern . . . 291 file -- Determine file type . . . . . . . . . 291 find -- Find a file meeting specified criteria . . . 296 filecache -- Manage file caches . . . . . . . 304 fold -- Break lines into shorter lines. . . . . . 304 functions -- Display or assign attributes to functions . . . . . . . . . . . . . . . 305 fuser -- List process IDs of processes with open files . . . . . . . . . . . . . . . . 306 gencat -- Create or modify message catalogs . . . 307 getconf -- Get configuration values . . . . . . 310 getfacl -- Display owner, group, and access control list (ACL) entries . . . . . . . . . . . . 314 getopts -- Parse utility options . . . . . . . 316 grep -- Search a file for a specified pattern . . . 319 hash -- Create a tracked alias . . . . . . . . 321 head -- Display the first part of a file . . . . . 322 history -- Display a command history list . . . . 323

iconv -- Convert characters from one code set to another . . . . . . . . . . . . . . . 324 id -- Return the user identity . . . . . . . . 326 inetd daemon -- Provide service management for networks . . . . . . . . . . . . . . . 328 infocmp -- Compare or print the terminal description . . . . . . . . . . . . . . 330 integer -- Mark each variable with an integer value . . . . . . . . . . . . . . . . 334 ipcrm -- Remove message queues, semaphore sets, or shared memory IDs . . . . . . . . . . 335 ipcs -- Report status of the interprocess communication facility . . . . . . . . . . 336 jobs -- Return the status of jobs in the current session . . . . . . . . . . . . . . . 343 join -- Join two sorted textual relational databases 345 kill -- End a process or job, or send it a signal . . 347 [ (left bracket) -- Test for a condition . . . . . 350 ld -- Link object files. . . . . . . . . . . 350 let -- Evaluate an arithmetic expression . . . . 358 lex -- Generate a program for lexical tasks . . . 360 line -- Copy one line of standard input . . . . 362 link -- Create a hard link to a file . . . . . . 363 ln -- Create a link to a file . . . . . . . . . 364 locale -- Get locale-specific information . . . . 368 localedef -- Define the locale environment . . . 372 logger -- Log messages . . . . . . . . . . 374 logname -- Return a user's login name . . . . . 376 lp -- Send a file to a printer . . . . . . . . 377 lpstat -- Show status of print queues (stub command) . . . . . . . . . . . . . . 378 ls -- List file and directory names and attributes 379 mail -- Read and send mail messages . . . . . 385 mailx -- Send or receive electronic mail . . . . 388 make -- Maintain program-generated and interdependent files . . . . . . . . . . . 408 makedepend -- Generate source dependency information . . . . . . . . . . . . . . 430 man -- Display sections of the online reference manual . . . . . . . . . . . . . . . 437 mesg -- Allow or refuse messages . . . . . . 439 mkcatdefs -- Preprocess a message source file . . 440 mkdir -- Make a directory . . . . . . . . . 442 mkfifo -- Make a FIFO special file . . . . . . 444 mknod -- Make a FIFO or character special file 445 more -- Display files on a page-by-page basis . . 446 mount -- Logically mount a file system . . . . 450 mv -- Rename or move a file or directory . . . . 454 newgrp -- Change to a new group . . . . . . 467 nice -- Run a command at a different priority . . 469 nl -- Number lines in a file . . . . . . . . 470 nm -- Display symbol table of object, library, or executable files . . . . . . . . . . . . . 472 nohup -- Start a process that is immune to hang ups . . . . . . . . . . . . . . . . . 475 obrowse -- Browse a z/OS UNIX file . . . . . 476 od -- Dump a file in a specified format . . . . 477 oedit -- Edit files in a z/OS UNIX file system . . 480 pack -- Compress files by Huffman coding . . . 482 passwd -- Change user passwords or password phrases . . . . . . . . . . . . . . . 484

iv z/OS V1R12.0 UNIX System Services Command Reference

paste -- Merge corresponding or subsequent lines of a file . . . . . . . . . . . . . . . 485 patch -- Change a file using diff output . . . . 486 pathchk -- Check a path name . . . . . . . 490 pax -- Interchange portable archives . . . . . 491 pcat -- Unpack and display Huffman packed files 521 pg -- Display files interactively . . . . . . . 522 pr -- Format a file in paginated form and send it to standard output . . . . . . . . . . . 526 print -- Return arguments from the shell . . . . 529 printenv -- Display the values of environment variables . . . . . . . . . . . . . . . 530 printf -- Write formatted output . . . . . . . 531 ps -- Return the status of a process . . . . . . 533 pwd -- Return the working directory name . . . 541 r -- Process a command history list . . . . . . 542 read -- Read a line from standard input . . . . 542 readonly -- Mark a variable as read-only . . . . 544 renice -- Change priorities of a running process 545 return -- Return from a shell function or . (dot) script . . . . . . . . . . . . . . . . 547 rlogind -- Validate rlogin requests . . . . . . 547 rm -- Remove a directory entry . . . . . . . 549 rmdir -- Remove a directory . . . . . . . . 551 runcat -- Pipe output from mkcatdefs to gencat 552 | script -- Makes a typescript of a terminal session 552 sed -- Start the sed noninteractive stream editor 554 set -- Set or unset command options and positional parameters. . . . . . . . . . . 560 setfacl -- Set, remove, and change access control lists (ACLs) . . . . . . . . . . . . . . 563 sh -- Invoke a shell . . . . . . . . . . . 568 shedit -- Interactive command and history editing in the shell . . . . . . . . . . . . . . 597 shift -- Shift positional parameters . . . . . . 604 sleep -- Suspend execution of a process for an interval of time . . . . . . . . . . . . . 605 skulker -- Remove old files from a directory . . . 606 sort -- Start the sort-merge utility . . . . . . 609 spell -- Detect spelling errors in files . . . . . 615 split -- Split a file into manageable pieces . . . . 617 stop -- Suspend a process or job . . . . . . . 618 strings -- Display printable strings in binary files 619 strip -- Remove unnecessary information from an executable file . . . . . . . . . . . . . 621 stty -- Set or display terminal options . . . . . 622 su -- Change the user ID associated with a session 628 submit -- Submit a batch job for background processing . . . . . . . . . . . . . . 631 sum -- Calculate and display checksums and block counts . . . . . . . . . . . . . . . . 633 suspend -- Send a SIGSTOP to the current shell 635 sysvar -- Display static system symbols . . . . 635 tabs -- Set tab stops . . . . . . . . . . . 636 tail -- Display the last part of a file . . . . . . 638 talk -- Talk to another user. . . . . . . . . 639 tar -- Manipulate the tar archive files to copy or back up a file . . . . . . . . . . . . . 641 tcsh -- Invoke a C shell . . . . . . . . . . 649 tcsh built-in command descriptions . . . . . . 696 tee -- Duplicate the output stream . . . . . . 716

test -- Test for a condition . . . . . . . . . 717 tic -- Put terminal entries in the terminfo database 721 time -- Display processor and elapsed times for a command . . . . . . . . . . . . . . 722 times -- Get process and child process times . . . 723 touch -- Change the file access and modification times . . . . . . . . . . . . . . . . 724 tput -- Change characteristics of terminals . . . 726 tr -- Translate characters . . . . . . . . . 728 trap -- Intercept abnormal conditions and interrupts. . . . . . . . . . . . . . . 731 true -- Return a value of 0 . . . . . . . . . 732 tso -- Run a TSO/E command from the shell . . 733 tsocmd -- Run a TSO/E command from the shell (including authorized commands) . . . . . . 737 tsort -- Sort files topologically. . . . . . . . 739 tty -- Return the user's terminal name . . . . . 740 type -- Tell how the shell interprets a name . . . 741 typeset -- Assign attributes and values to variables 742 uconvdef -- Create binary conversion tables . . . 744 ulimit -- Set process limits . . . . . . . . . 745 umask -- Set or return the file mode creation mask 746 unalias -- Remove alias definitions . . . . . . 748 uname -- Display the name of the current operating system . . . . . . . . . . . . 749 uncompress -- Undo Lempel-Ziv compression of a file . . . . . . . . . . . . . . . . . 750 unexpand -- Compress spaces into tabs . . . . 751 uniq -- Report or filter out repeated lines in a file 752 unlink -- Removes a directory entry . . . . . 754 unmount -- Remove a file system from the file hierarchy . . . . . . . . . . . . . . . 754 unpack -- Decode Huffman packed files . . . . 757 unset -- Unset values and attributes of variables and functions . . . . . . . . . . . . . 758 uptime -- Report how long the system has been running . . . . . . . . . . . . . . . 759 uucc -- Compile UUCP configuration files . . . 760 uucico daemon -- Process UUCP file transfer requests . . . . . . . . . . . . . . . 761 uucp -- Copy files between remote UUCP systems 763 uucpd daemon -- Invoke uucico for TCP/IP connections from remote UUCP systems . . . . 767 uudecode -- Decode a transmitted binary file . . 768 uuencode -- Encode a file for safe transmission 769 uulog -- Display log information about UUCP events . . . . . . . . . . . . . . . . 770 uuname -- Display list of remote UUCP systems 772 uupick -- Manage files sent by uuto and uucp . . 773 uustat -- Display status of pending UUCP transfers . . . . . . . . . . . . . . . 774 uuto -- Copy files to users on remote UUCP systems . . . . . . . . . . . . . . . 778 uux -- Request command execution on remote UUCP systems . . . . . . . . . . . . . 779 uuxqt daemon -- Carry out command requests from remote UUCP systems . . . . . . . . 782 vi -- Use the display-oriented interactive text editor . . . . . . . . . . . . . . . . 784 wait -- Wait for a child process to end . . . . . 816 wall -- Broadcast a message to logged-in users . . 817

Contents v

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download