Extending Fuser

Total Page:16

File Type:pdf, Size:1020Kb

Extending Fuser Master Foo and the Ten Thousand Lines Master Foo once said to a visiting programmer: «There is more Unix-nature in one line of shell script than there is in ten thousand lines of C.» The programmer, who was very proud of his mastery of C, said: «How can this be? C is the language in which the very kernel of Unix is implemented!» Master Foo replied: «That is so. Nevertheless, there is more Unix-nature in one line of shell script than there is in ten thousand lines of C.» The programmer grew distressed. «But through the C language we experience the enlightenment of the Patri- arch Ritchie! We become as one with the operating system and the machine, reaping matchless performance!» Master Foo replied: «All that you say is true. But there is still more Unix-nature in one line of shell script than there is in ten thousand lines of C.» The programmer scoffed at Master Foo and rose to depart. But Master Foo nodded to his student Nubi, who wrote a line of shell script on a nearby whiteboard, and said: «Master programmer, consider this pipeline. Implemented in pure C, would it not span ten thousand lines?» The programmer muttered through his beard, contemplating what Nubi had written. Finally he agreed that it was so. «And how many hours would you require to implement and debug that C program?» asked Nubi. «Many,» admitted the visiting programmer. «But only a fool would spend the time to do that when so many more worthy tasks await him.» «And who better understands the Unix-nature?» Master Foo asked. «Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?» Upon hearing this, the programmer was enlightened. 1 File System Users: Extending fuser Example 1: File System Users Beyond fuser Background: • you need to know who is doing what with some file system object (file, directory, whole file system. ) • the fuser command can tell the PIDs of involved process(es) • you want more: – process owner – complete command line Beyond fuser Interactive solution Who is using the /tmp file system? fuser -m /tmp /tmp: 531 3332 3809 11222 16745 32364 Then we need to know what each PID is: ps -p 531 PID TTY TIME CMD 531 ? 00:00:00 screen So it is a screen process, it has no attached tty, and has used no time. Beyond fuser Interactive solution /2 . or even better ps -p 531 -f UID PID PPID C STIME TTY TIME CMD john 531 1 0 Oct19 ? 00:00:00 SCREEN (complete commandline is available adding the -l switch, but output is too long to fit on a slide) We would then need to repeat for each of the PIDs listed in the output of fuser. Beyond fuser Step by Step Shell Function /2 1. first explode the output into tokens: fuser -m /tmp | tr -s ” ” ”nn” /tmp: 531 3332c ... tr simply converts each occurrence of a given character into a different one: here we convert spaces in newlines; the -s option collapses repeated characters. There can be a few letters attached to PIDs: here c means «current directory». Then you can have f open files e executable being run m mmaped file or shared library r root directory Beyond fuser Step by Step Shell Function /3 2. then take only PIDs out of the list: fuser -m /tmp | tr -s ” ” ”nn” |n egrep -o ’[0-9]+’ 531 3332 ... egrep selects only digits ([0-9]), optionally repeated (+), then outputs only the matching string (-o). Note that this implementation if far from perfection: if there is any digit in the file/directory name, it is treated as a PID.s Some versions of fuser are smarter than others, and output PID on STDOUT and any other additional information on STDERR, so filtering could be much easier (and effective). Beyond fuser Step by Step Shell Function /4 3. finally pass the resulting list to ps with any appropriate option: fuser -m /tmp | tr -s ” ” ”nn” |n egrep -o ’[0-9]+’ | xargs ps -f -p UID PID PPID C STIME TTY STAT TIME CMD john 531 1 0 Oct19 ? Ss 0:00 SCREEN eve 3332 1 0 Sep29 ? Ss 0:00 /usr/bin/lamd -H 127.0.0.1 -P 56154 -n 0 -o 0 xargs takes its STDIN and appends it to a given command line (here ps -f -p). Beyond fuser Step by Step Shell Function /5 As a last step we wrap everything in a shell function: function fuser2 () { fuser $* |\ tr -s " " "\n" |\ egrep -o ’[0-9]+’ |\ xargs ps -fl -p } where $* is used so that any command line parameter given to our little function is passed to the inner fuser command. 2 2 Find Users on a Node Example 2: Node Users Background: • HPC cluster with the Maui job scheduler • we need to know the user list for a given node – nodes are not job-exclusive – there can be jobs from different users sharing a node • available commands: – checknode reports information on a given node, including the list of job assigned to the node – checkjob reports information on a given job, including the list of assigned nodes and the job owner Node Users Interactive Solution Step by Step /1 [root@cerbero ] checknode a206 checking node a206 State: Running (general information on node status omitted) Reservations: Job ’115713’(x1) -1:18:00:36 -> 2:05:58:24 (3:23:59:00) Job ’115848’(x1) -22:07:38 -> 3:01:51:22 (3:23:59:00) JobList: 115713,115848 Jobs 115713 and 115848 are running on node a206. Node Users Interactive Solution Step by Step /2 [root@cerbero ] checkjob 115713 checking job 115713 State: Running Creds: user:joe group:phys class:smp2 qos:slow WallTime: 1:18:39:39 of 4:00:00:00 SubmitTime: Tue Oct 21 15:43:36 (more information omitted) Job 115713 owner is user joe; job has run for 1 day, 18 hours and 39 minutes out of 4 days requested. Now we would need to repeat for job 115848. If we wanted to know current users of a dozen more nodes, the whole process is not exactly exciting. Node Users Step by Step Shell Function /1 We are going to define a shell function node_user that is going to accept a single argument (a node name) and output the list of users on a node, along with their remaining time. 1. Let’s start by extracting the list of running jobs on the node: checknode a206 | grep JobList JobList: 115713,115848 Node Users Step by Step Shell Function /2 2. then explode the list to single components: checknode a206 | grep JobList | egrep -o ’[0-9]+’ 115971 115713 The regular expression ’[0-9]+’ means «any digit, repeated one or more times»; the -o option tells egrep to output only the matching strings (not whole lines). 3 Node Users Step by Step Shell Function /3 3. then pass each of the list elements to the checkjob command: checknode a206 | grep JobList | egrep -o ’[0-9]+’ | xargs -i checkjob {} (very long output, not shown) • xargs takes its standard input and uses it to build a new command line • the -i option tells xargs to iterate over input elements and build a command line for each one • {} is a placeholder in the command line where xargs will put each list element Node Users Step by Step Shell Function /4 4. finally filter the insanely long output to get only user and WallTime lines: checknode a206 | grep JobList | egrep -o ’[0-9]+’ | xargs -i checkjob {} | egrep -o ’user:[ˆ ]+|WallTime: .+’ Another regular expression where • | is logical «OR» • [ˆ ] means «everything that is not a space» Node Users Step by Step Shell Function /5 The final magic: function node_user () { [ $# -ne 1 ] && { echo "Usage: $FUNCNAME nodename" 1>&2; return 1 }; checknode $1 | grep JobList |\ egrep -o ’[0-9]+’ | xargs -i checkjob {} |\ egrep -o ’user:[^ ]+|WallTime: .+’ } 3 Check for Dead Services and Restart When Needed Example 3: Restart Dead Services Background: • you have some slightly unstable service that sometimes crashes and needs to be restarted; or maybe it is sometimes killed due to resource exaustion (fairly typical on computing nodes if jobs are allowed to use all available memory) • you don’t want to deploy a full-featured monitoring system and/or need a quick-and-dirty solution • you want a basic level of configurability, e.g. you want to be able to shut down a service and not have it restarted • monitored services are important enough that you want them restarted without human intervention, but not so critical you need them to be restarted «now» 4 Restart Dead Services Interactive Solution Step by Step At some point node m001 starts looking funny. 1. go to node m001: ssh m001 2. check for service availability: service ntpd status ntpd is stopped 3. you known for sure that ntpd should be there, so you restart it: service ntpd restart ntpd: Synchronizing with time server: [OK] Starting ntpd: [OK] Restart Dead Services Step by Step Shell Script /1 Version 0 script could be #!/bin/bash service ntpd status || \ service ntpd restart The first part of the pipeline reports the service status both on STDOUT and in the exit code – we are only interested in the exit code actually. Restart Dead Services Step by Step Shell Script /2 A more advanced version of our script would check if ntpd is supposed to be there before deciding it is thime to (re)start it. This can be done with chkconfig: chkconfig --list ntpd ntpd 0:off 1:off 2:off 3:on 4:on 5:on 6:off But what runlevel are we currently in? runlevel N 3 So this will tell us what we really need to know: RL=$( runlevel | cut -d’ ’ -f2 ) chkconfig --list ntpd | grep -q ${RL}:on echo $? 0 Restart Dead Services Step by Step Shell Script /3 We can make a shell function with our little «check if service should be there» piece of script: function is_active() { [ "x$1" = "x" ] && return 1 local SERVICE=$1 local RL=$( runlevel | cut -d’ ’ -f2 ) chkconfig --list $SERVICE | \ grep -q "${RL}:on" return $? } 5 Restart Dead Services Step by Step Shell Script /4 The new script will then be: #!/bin/bash (here goes the definition of is_active) is_active ntpd && \ { service ntpd status >/dev/null ||\ service ntpd restart ; } Restart Dead Services Step by Step Shell Script /5 As a final step the script needs to be executed periodically.
Recommended publications
  • Plw Sc/Nt/Ntr/Ls
    K Service Source PLW SC/NT/NTR/LS Personal LaserWriter SC, Personal LaserWriter NT, Personal LaserWriter NTR, Personal LaserWriter LS, Personal LaserWriter LS/L K Service Source Basics PLW SC/NT/NTR/LS Basics Product Information - 1 Product Information The printers covered in this manual are • Personal LaserWriter SC • Personal LaserWriter NT • Personal LaserWriter NTR • Personal LaserWriter LS • Personal LaserWriter LS/L Compatibility Not all parts are compatible among the five models. Refer to Illustrated Parts for compatibility cross references. The cassette feeder tray and its associated parts are optional on the LS, LS/L, and NTR models. Basics Paper Paths - 2 Paper Paths There are four paper paths in the Personal LaserWriter. Paper is fed from the cassette or multipurpose tray and delivered to the face-down or face-up delivery trays. Note: Face signifies image side. Default delivery is face- down at the top of the printer. Basics LS–LS/L Identification - 3 LS–LS/L Identification I/O Board Bracket The LS/L is a cost-reduced version of the LS but is sold and packaged under the same LS name. Parts are not necessarily interchangeable between the two models. Power Switch External distinguishing characteristics: • LS: The power switch is on the left rear of printer; the rear cover has an opening for an I/O board bracket and Personal LaserWriter LS displays the family number M2000. • LS/L: The power switch is on the right rear of printer; Solid Rear Cover the rear cover is solid plastic and displays the family number M2002. Power Switch Personal LaserWriter LS/L Basics Sensing System Theory - 4 Sensing System Theory There are six sensors in the PS11 Personal LaserWriter: four PS12 paper sensors and two printer-open sensors.
    [Show full text]
  • Advanced Bash-Scripting Guide
    Advanced Bash−Scripting Guide An in−depth exploration of the art of shell scripting Mendel Cooper <[email protected]> 2.2 31 October 2003 Revision History Revision 0.1 14 June 2000 Revised by: mc Initial release. Revision 0.2 30 October 2000 Revised by: mc Bugs fixed, plus much additional material and more example scripts. Revision 0.3 12 February 2001 Revised by: mc Another major update. Revision 0.4 08 July 2001 Revised by: mc More bugfixes, much more material, more scripts − a complete revision and expansion of the book. Revision 0.5 03 September 2001 Revised by: mc Major update. Bugfixes, material added, chapters and sections reorganized. Revision 1.0 14 October 2001 Revised by: mc Bugfixes, reorganization, material added. Stable release. Revision 1.1 06 January 2002 Revised by: mc Bugfixes, material and scripts added. Revision 1.2 31 March 2002 Revised by: mc Bugfixes, material and scripts added. Revision 1.3 02 June 2002 Revised by: mc 'TANGERINE' release: A few bugfixes, much more material and scripts added. Revision 1.4 16 June 2002 Revised by: mc 'MANGO' release: Quite a number of typos fixed, more material and scripts added. Revision 1.5 13 July 2002 Revised by: mc 'PAPAYA' release: A few bugfixes, much more material and scripts added. Revision 1.6 29 September 2002 Revised by: mc 'POMEGRANATE' release: some bugfixes, more material, one more script added. Revision 1.7 05 January 2003 Revised by: mc 'COCONUT' release: a couple of bugfixes, more material, one more script. Revision 1.8 10 May 2003 Revised by: mc 'BREADFRUIT' release: a number of bugfixes, more scripts and material.
    [Show full text]
  • System Analysis and Tuning Guide System Analysis and Tuning Guide SUSE Linux Enterprise Server 15 SP1
    SUSE Linux Enterprise Server 15 SP1 System Analysis and Tuning Guide System Analysis and Tuning Guide SUSE Linux Enterprise Server 15 SP1 An administrator's guide for problem detection, resolution and optimization. Find how to inspect and optimize your system by means of monitoring tools and how to eciently manage resources. Also contains an overview of common problems and solutions and of additional help and documentation resources. Publication Date: September 24, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents About This Guide xii 1 Available Documentation xiii
    [Show full text]
  • Mostly-Static Decentralized Information Flow Control by Andrew C
    Mostly-Static Decentralized Information Flow Control by Andrew C. Myers Submitted to the Department of Electrical Engineering and Computer Science in partial ful®llment of the requirements for the degree of Doctor of Philosophy at the Massachusetts Institute of Technology February 1999 c Massachusetts Institute of Technology 1999. All rights reserved. Author :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Department of Electrical Engineering and Computer Science January 7, 1999 Certi®ed by :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Barbara Liskov Ford Professor of Engineering Thesis Supervisor Accepted by ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: Arthur C. Smith Chairman, Departmental Committee on Graduate Students Mostly-Static Decentralized Information Flow Control by Andrew C. Myers Submitted to the Department of Electrical Engineering and Computer Science on January 7, 1999, in partial ful®llment of the requirements for the degree of Doctor of Philosophy Abstract The growing use of mobile code in downloaded programs such as applets and servlets has increased interest in robust mechanisms for ensuring privacy and secrecy. Common security mechanisms such as sandboxing and access control are either too restrictive or too weakÐthey prevent applications from sharing data usefully, or allow private information to leak. For example, security mechanisms in Java prevent many useful applications while still permitting Trojan horse applets
    [Show full text]
  • 07 07 Unixintropart2 Lucio Week 3
    Unix Basics Command line tools Daniel Lucio Overview • Where to use it? • Command syntax • What are commands? • Where to get help? • Standard streams(stdin, stdout, stderr) • Pipelines (Power of combining commands) • Redirection • More Information Introduction to Unix Where to use it? • Login to a Unix system like ’kraken’ or any other NICS/ UT/XSEDE resource. • Download and boot from a Linux LiveCD either from a CD/DVD or USB drive. • http://www.puppylinux.com/ • http://www.knopper.net/knoppix/index-en.html • http://www.ubuntu.com/ Introduction to Unix Where to use it? • Install Cygwin: a collection of tools which provide a Linux look and feel environment for Windows. • http://cygwin.com/index.html • https://newton.utk.edu/bin/view/Main/Workshop0InstallingCygwin • Online terminal emulator • http://bellard.org/jslinux/ • http://cb.vu/ • http://simpleshell.com/ Introduction to Unix Command syntax $ command [<options>] [<file> | <argument> ...] Example: cp [-R [-H | -L | -P]] [-fi | -n] [-apvX] source_file target_file Introduction to Unix What are commands? • An executable program (date) • A command built into the shell itself (cd) • A shell program/function • An alias Introduction to Unix Bash commands (Linux) alias! crontab! false! if! mknod! ram! strace! unshar! apropos! csplit! fdformat! ifconfig! more! rcp! su! until! apt-get! cut! fdisk! ifdown! mount! read! sudo! uptime! aptitude! date! fg! ifup! mtools! readarray! sum! useradd! aspell! dc! fgrep! import! mtr! readonly! suspend! userdel! awk! dd! file! install! mv! reboot! symlink!
    [Show full text]
  • UNIX System Services Z/OS Version 1 Release 7 Implementation
    Front cover UNIX System Services z/OS Version 1 Release 7 Implementation z/OS UNIX overview z/OS UNIX setup z/OS UNIX usage Paul Rogers Theodore Antoff Patrick Bruinsma Paul-Robert Hering Lutz Kühner Neil O’Connor Lívio Sousa ibm.com/redbooks International Technical Support Organization UNIX System Services z/OS Version 1 Release 7 Implementation March 2006 SG24-7035-01 Note: Before using this information and the product it supports, read the information in “Notices” on page xiii. Second Edition (March 2006) This edition applies to Version 1 Release 7 of z/OS (5637-A01), and Version 1, Release 7 of z/OS.e (5655-G52), and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2003, 2006. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . xiii Trademarks . xiv Preface . .xv The team that wrote this redbook. .xv Become a published author . xvi Comments welcome. xvii Chapter 1. UNIX overview. 1 1.1 UNIX fundamentals . 2 1.1.1 UNIX objectives . 2 1.1.2 What people like about UNIX . 2 1.1.3 What people don’t like about UNIX . 3 1.1.4 UNIX operating system . 3 1.1.5 UNIX file system . 4 1.1.6 Parameter files . 6 1.1.7 Daemons. 6 1.1.8 Accessing UNIX . 6 1.1.9 UNIX standards. 7 1.1.10 MVS and UNIX functional comparison . 8 1.2 z/OS UNIX System Services fundamentals .
    [Show full text]
  • (12) United States Patent (10) Patent N0.: US 7,283,777 B2 Russel Et Al
    US007283777B2 (12) United States Patent (10) Patent N0.: US 7,283,777 B2 Russel et al. (45) Date of Patent: Oct. 16, 2007 (54) SYSTEM AND METHOD FOR (58) Field of Classi?cation Search .............. .. 399/323, CHARACTERIZING FUSER STRIPPING 399/33, 315, 21, 324, 322 PERFORMANCE See application ?le for complete search history. (75) Inventors: Steven M. Russel, Pittsford, NY (US); (56) References Cited Mansour Messalti, Sherwood, OR U. S. PATENT DOCUMENTS (US); Jeremy Christopher deJong, Orchard Park, NY (US); Anthony S. 4,952,982 A * 8/1990 Tabuchi ....... .. 399/22 Condello, Webster, NY (US); Daniel 5,282,009 A * l/l994 Derimiggio 399/46 James McVeigh, Webster, NY (US); 5,406,363 A * 4/1995 Siegel et a1. .............. .. 399/323 Donald M. Bott, Rochester, NY (US); 6,795,677 B2 9/2004 Berkes et a1. James Joseph Padula, Webster, NY * cited by examiner (Us) Primary ExamineriDavid M. Gray (73) Assignee: Xerox Corporation, Stamford, CT Assistant Examiner4Geoifrey T Evans (Us) (74) Attorney, Agent, or FirmiDuane C. Basch; Basch & Nickerson LLP ( * ) Notice: Subject to any disclaimer, the term of this patent is extended or adjusted under 35 (57) ABSTRACT U.S.C. 154(b) by 0 days. Disclosed herein are several embodiments to facilitate the (21) Appl. No.: 11/343,672 characterization of fuser stripping performance. Recogniz ing that the characteristics of a substrate exiting a fusing nip (22) Filed: Jan. 31, 2006 are indicative of the operation of the nip and the stripping operation itself, several contact and non-contact sensing (65) Prior Publication Data methods are described to detect or predict degraded strip US 2007/0177913 A1 Aug.
    [Show full text]
  • Centos Cheat Sheet Cheat Sheet by Bromono Via Cheatography.Com/20940/Cs/3795
    CentOS Cheat Sheet Cheat Sheet by bromono via cheatography.com/20940/cs/3795/ Help Commands Partitions and Disk Management File Operations (cont) ls Options whatis df less View a file on page at a -a Show all (including hidden) time, allows for going Search whatis database for Report file system disk space -R Recursive list backwards complete words; used to find usage -r Reverse order short descrip​ tions of system head Print the first 10 lines of a mount commands file -t Sort by last modified Show whats mounted or mount Sort by file size which tail Print the last 10 lines of a -S a file system file Long listing format Shows the full path to shell -l unmou​ nt wc Count the number of commands -1 One file per line Unmount a file system words or characters in a where​ is file -m Comma-s​ epa​ rated output fuser Locate binary, source and man stat Display file of file system -Q Quoted output pages for a command Identifies processes using files status or sockets aprop​ os cut Remove sections from grep Options isof lines of input Search through a database of -i Case insensi​ tive search short descrip​ tion to find help list open files on the system paste Merge lines of files -r Recursive search and man pages containing -v Inverted search certain terms and commands Directory Operations Searching Files -o Show matched part of file only man clear clears your screen grep Search text files for lines Manual pages for commands containing a matching pwd Shows current directory Process Management pattern cd Change directo​ ries Report on current Bash
    [Show full text]
  • Выключатели Нагрузки Socomec Sirco M И Sirco MV - Брошюра На Продукцию
    ---------- ,__ _________ Выключатели нагрузки Socomec Sirco M и Sirco MV - брошюра на продукцию. Юниджет SIRCO M - https://www.uni-jet.com/catalog/commutation/vyiklyuchateli-nagruzki/ socomec-sirco-m/ SIRCO MV - https://www.uni-jet.com/catalog/commutation/vyiklyuchateli-nagruzki/ l�-' socomec-sirco-mv/ un I Jet SIRCO M and MV Modular universal switches from 16 to 160 A SOCOMEC : ADDITIONAL SOCOMEC Innovators in LV switching solutions SWITCHING SOLUTIONS As a world leader in electrical switching and protection systems, SOCOMEC launches a new generation of load > SIRCO load break switches up to 5000 A break and changeover switches for applications from 16 to 160 A. SIRCO M and MV : Total integration of all electrical functions: isolating, control and changeover switching SOCOMEC has developed a new technical concept that combines the features of a load break switch and a SIRCM 353 A changeover switch in order to propose a highly innovative modular design. > Manualandmotorisedchangeover SIRCO M and MV : switch Full compliance with IEC, EN 60947-3 or UL 508 standards The new SIRCO M and MV range of load break switches has been designed, qualified and tested according to the criteria defined by the IEC 60947-3 standard. This process guarantees a high quality level for the product which is fully adapted to arduous operating environments when operating in the field. ATYSM 007 A > FusecombinationswitchesFUSERBLOC - Frontorrightsideoperation FUSER 703 A ATYS 079 A SIRCO M Modular universal switches the versatile solution Usestandardcomponentstocreateasolutionthatperfectlysuitstoyourapplication. SWITCHING & DISCONNECTION CHANGEOVER SWITCHING ADAPTABLE For safe and optimised operation of LV Two mechanically interlocked switches. To all motor or distribution load applications.
    [Show full text]
  • Unix Command
    Veloce descrizione di comandi Unix Buona parte dei comandi dell’elenco seguente fanno parte della distribuzione standard di molte architetture Unix. Per i dettagli vedere le relative pagine di manuale, invocabili con il comando "man topic". a2p convertitore awk - perl amstex AmSTeX language create, modify, and extract from archives (per creare ar librerie) arch print machine architecture at, batch, atq, atrm - queue, examine or delete jobs for later at execution awk gawk - pattern scanning and processing language basename strip directory and suffix from filenames bash GNU Bourne-Again SHell bc An arbitrary precision calculator language bibtex make a bibliography for (La)TeX c++ GNU project C++ Compiler cal displays a calendar cat concatenate files and print on the standard output cc gcc, g++ - GNU project C and C++ Compiler checkalias usage: /usr/bin/checkalias alias .. chfn change your finger information chgrp change the group ownership of files chmod change the access permissions of files chown change the user and group ownership of files chsh change your login shell cksum checksum and count the bytes in a file clear clear terminal screen cmp compare two files col filter reverse line feeds from input column columnate lists comm compare two sorted files line by line compress compress, uncompress, zcat - compress and expand data cp copy files cpio copy files to and from archives tcsh - C shell with file name completion and command line csh editing csplit split a file into sections determined by context lines cut remove sections from each
    [Show full text]
  • Oracle Universal Installer and Opatch User's Guide for Windows and UNIX
    Oracle® Universal Installer and OPatch User’s Guide 11g Release 2 (11.2) for Windows and UNIX E12255-11 March 2011 Oracle Universal Installer and OPatch User’s Guide, 11g Release 2 (11.2) for Windows and UNIX E12255-11 Copyright © 1996, 2011, Oracle and/or its affiliates. All rights reserved. Primary Author: Michael Zampiceni Contributor: Smitha Viswanathan, Sumant Sankaran, Phi Nguyen This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this software or related documentation is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007).
    [Show full text]
  • POSIX-2017 Shell & Utilities Utilities
    POSIX-2017 Shell & Utilities Utilities admin - create and administer SCCS files (DEVELOPMENT) ex - text editor alias - define or display aliases expand - convert tabs to spaces ar - create and maintain library archives expr - evaluate arguments as an expression asa - interpret carriage-control characters false - return false value at - execute commands at a later time fc - process the command history list awk - pattern scanning and processing language fg - run jobs in the foreground basename - return non-directory portion of a pathname file - determine file type batch - schedule commands to be executed in a batch queue find - find files bc - arbitrary-precision arithmetic language fold - filter for folding lines bg - run jobs in the background fort77 - FORTRAN compiler (FORTRAN) c99 - compile standard C programs fuser - list process IDs of all processes that have one or more files cal - print a calendar open cat - concatenate and print files gencat - generate a formatted message catalog cd - change the working directory getconf - get configuration values cflow - generate a C-language flowgraph (DEVELOPMENT) get - get a version of an SCCS file (DEVELOPMENT) chgrp - change the file group ownership getopts - parse utility options chmod - change the file modes grep - search a file for a pattern chown - change the file ownership hash - remember or report utility locations cksum - write file checksums and sizes head - copy the first part of files cmp - compare two files iconv - codeset conversion command - execute a simple command id - return
    [Show full text]