UNIX Commands Reference

Total Page:16

File Type:pdf, Size:1020Kb

UNIX Commands Reference Mail Tools Special Command elm Sends and displays mail messages Line Characters Unix mailx Sends and displays mail messages > Redirect standard output to the file; erase mutt Sends and displays mail messages the file first Reference pine Sends and displays mail messages >> Redirect standard output to the file; xbiff Displays a mailbox and flag image on an append to the file X window when mail has arrived < Redirect standard input from the file Card | Pipe the standard output from one Text Editors command to the next A helpful reference to Unix commands on the CECS emacs Text Editor ? Single character wildcard Unix computers. gvim Graphical version of vim * Multiple character wildcard pico Text Editor [...] One of ... wild card vi Text Editor ; Command separator vim vi improved - Text Editor . Current directory xedit Simple Graphical Text Editor .. Parent directory xemacs Graphical version of emacs [gnu] / Directory level separator Text Processing Tools & Run command in the background http://www.cat.pdx.edu $ Begin shell variable name cat Concatenate (list) a file [email protected] = Shell variable assignment cut Displays specified parts from each line of a file dos2unix Convert text file from DOS format to Filename Expansion Program descriptions followed by [packageName] UNIX format Characters indicate which package the program is located in head List the beginning of a file ispell Spelling checker * Matches any characters (0 or more) Packages less Similar to more, but allows backward ? Matches any single character movement [...] matches any character in the enclosed list Packages configure the user's environment based on more List a file page by page or range what software he/she wants to use. nroff Formats text Control Sequences There are several convenient user commands used paste Joins corresponding lines of several files to maintain the software package configuration. Once or subsequent lines in one file ctrl-c Cancel the process that is currently configured, the system will transparently update your environment based on selected packages every time tail List the end of a file running. ctrl-d you log in. unix2dos Convert text file from UNIX format to Exit the UNIX session DOS format ctrl-l Re-draws the screen Make sure you log out and back in for any changes ctrl-q Resume display scrolling you make to your packages environment to take effect. Postscript and Acrobat ctrl-s Pause display scrolling File Utilities ctrl-u Delete the current line Commands: acroread Acrobat Reader (.pdf) ctrl-z Suspend a foreground process addpkg Adds program package to users environment ghostview Ghostscript interpretive previewer ë Web Tools ë delpkg Deletes program package from users gs Ghostscript interpretive previewer htpasswd Password protect web pages environment ps2pdf Convert postscript file to a pdf file bluefish Graphical html Editor [gnu] listpkg Lists program packages currently in [gnu] users environment passwd Change your UNIX password General Commands Printing ps Display process status at Runs a command at a particular time lpq –P printerName pwd Print working directory cd Change working directory Check the print queue renice Alter priority of running processes checkpasswd Change your UNIX password lpr –P printerName fileName rm Remove files Print a file chmod Change file permissions rmdir Remove a directory lprm –P printerName jobNumber convert Converts an input file using one image Remove a job from the print queue format to an output file with a differing rxvt X window terminal emulator enscript –P printerName fileName image format set Read and write variables Convert a text file to postscript cp Copy a file show Show (list) messages date Display today’s date sort Sort files Compressing And diff Find file differences ssh Connect to a remote host Uncompressing Files display Displays many graphic formats on X strings Finds strings in an ASCII or binary file bunzip2 Uncompress files (.bz2) windows tail Display last few lines of files bzip2 Compress files (.bz2) du Summarize disk usage talk Interactive talking to another user compress Compress files (.Z) echo Evaluate and print command line tin Network news reader gunzip Uncompress (expand) files (.gz) exit Leave the UNIX session top Display and update information about gzcat GNU compression/decompression export Make shell environment variable the cpu processes program (.gz) available touch Update the date of a file gzip Compress files (.gz) fg Move a background job to the tar foreground tr Translate characters Saves and restores multiple files to a single file (.tar) file Classify the file contents uniq Removes or lists repeated lines in a file uncompress Uncompress (expand) files (.Z) find Find files meeting specified conditions uptime Shows how long a system has been up w List current system activity finger Display information about local and Languages/Compilers remote users wc Word count / ftp Transfer files from one host to another who List who is on the system Interpreters/Scripts gnuplot GNU interactive plotting program [gnu] xcalc Scientific calculator for X windows as SPARC assembler grep Search a file for a pattern xclock X window clock awk Finds lines in files and makes specified changes to them head Display first few lines of files xterm X window terminal emulator g++ GNU C ++ compiler kill Terminate a process gawk GNU’s AWK programming language ln Link to a file Image Viewing And gcc GNU C compiler logout C shell logoff Manipulation lclint ls Check C code for errors List directory contents gimp Versatile windowing image program perl Practical Extraction and Report make Used to build programs and maintain up- (Similar to Adobe Photoshop) Language interpreted language to-date versions of target files [image-toolz] optimized for scanning arbitrary text files man View documentation of a command xpaint Gui window paint program [image-toolz] mkdir Create a directory xv Interactive image display for X windows Debuggers msgs View departmental and system ddd Graphical front-end for GDB and other messages command-line debuggers [gnu] mv Move or rename a file gdb Source-level debugger for C, C++ and myquota –v View your disk quota usage Fortran. new-env Restore the default shell and window xxgdb Gui front-end to gdb environment to your account nice Invoke a command with an altered scheduling priority.
Recommended publications
  • Cygwin User's Guide
    Cygwin User’s Guide Cygwin User’s Guide ii Copyright © Cygwin authors Permission is granted to make and distribute verbatim copies of this documentation provided the copyright notice and this per- mission notice are preserved on all copies. Permission is granted to copy and distribute modified versions of this documentation under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. Permission is granted to copy and distribute translations of this documentation into another language, under the above conditions for modified versions, except that this permission notice may be stated in a translation approved by the Free Software Foundation. Cygwin User’s Guide iii Contents 1 Cygwin Overview 1 1.1 What is it? . .1 1.2 Quick Start Guide for those more experienced with Windows . .1 1.3 Quick Start Guide for those more experienced with UNIX . .1 1.4 Are the Cygwin tools free software? . .2 1.5 A brief history of the Cygwin project . .2 1.6 Highlights of Cygwin Functionality . .3 1.6.1 Introduction . .3 1.6.2 Permissions and Security . .3 1.6.3 File Access . .3 1.6.4 Text Mode vs. Binary Mode . .4 1.6.5 ANSI C Library . .4 1.6.6 Process Creation . .5 1.6.6.1 Problems with process creation . .5 1.6.7 Signals . .6 1.6.8 Sockets . .6 1.6.9 Select . .7 1.7 What’s new and what changed in Cygwin . .7 1.7.1 What’s new and what changed in 3.2 .
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Fifth Internet Edition William Shotts A LinuxCommand.org Book Copyright ©2008-2019, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042. A version of this book is also available in printed form, published by No Starch Press. Copies may be purchased wherever fine books are sold. No Starch Press also offers elec- tronic formats for popular e-readers. They can be reached at: https://www.nostarch.com. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. Release History Version Date Description 19.01A January 28, 2019 Fifth Internet Edition (Corrected TOC) 19.01 January 17, 2019 Fifth Internet Edition. 17.10 October 19, 2017 Fourth Internet Edition. 16.07 July 28, 2016 Third Internet Edition. 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. Table of Contents Introduction....................................................................................................xvi Why Use the Command Line?......................................................................................xvi
    [Show full text]
  • Shell Variables
    Shell Using the command line Orna Agmon ladypine at vipe.technion.ac.il Haifux Shell – p. 1/55 TOC Various shells Customizing the shell getting help and information Combining simple and useful commands output redirection lists of commands job control environment variables Remote shell textual editors textual clients references Shell – p. 2/55 What is the shell? The shell is the wrapper around the system: a communication means between the user and the system The shell is the manner in which the user can interact with the system through the terminal. The shell is also a script interpreter. The simplest script is a bunch of shell commands. Shell scripts are used in order to boot the system. The user can also write and execute shell scripts. Shell – p. 3/55 Shell - which shell? There are several kinds of shells. For example, bash (Bourne Again Shell), csh, tcsh, zsh, ksh (Korn Shell). The most important shell is bash, since it is available on almost every free Unix system. The Linux system scripts use bash. The default shell for the user is set in the /etc/passwd file. Here is a line out of this file for example: dana:x:500:500:Dana,,,:/home/dana:/bin/bash This line means that user dana uses bash (located on the system at /bin/bash) as her default shell. Shell – p. 4/55 Starting to work in another shell If Dana wishes to temporarily use another shell, she can simply call this shell from the command line: [dana@granada ˜]$ bash dana@granada:˜$ #In bash now dana@granada:˜$ exit [dana@granada ˜]$ bash dana@granada:˜$ #In bash now, going to hit ctrl D dana@granada:˜$ exit [dana@granada ˜]$ #In original shell now Shell – p.
    [Show full text]
  • Mupif.Org Platform User Manual Authors: B
    MuPIF.org Platform User Manual Authors: B. Patzák​1 ​and V. Šmilauer1 Version 1.1.2 - 8/2017 1 Czech Technical University, Faculty of Civil Engineering, Department of Mechanics, Thákurova 7, 16629, Prague, Czech Republic. 1/54 1. Table of Content 1. Table of Content 2. Introduction 3. Platform installation 3.1. Prerequisites 3.1.1. Windows platforms 3.1.2. Linux / Unix (*nix) platforms 3.1.3. General requirements 3.1.4. Other recommended packages/softwares 3.2. Installing the MuPIF platform 3.3. Verifying platform installation 3.3.1. Running unit tests 3.3.2. Running examples 4. Platform operations 5. Platform APIs 5.1. Application class 5.2. Property class 5.3. Field class 5.4. Function class 5.5. TimeStep class 5.6. Mesh class 5.7. Cell class 5.8. Vertex class 5.9. BoundingBox 5.10. APIError 6. Developing Application Program Interface (API) 7. Developing user workflows 7.2 Workflow templates 7.3 Workflow example 7.4 Workflow as a class 8. Distributed Model 8.1. Distributed aspects of the API 8.2. Requirements for distributed computing 8.3. Internal platform solution - JobManager resource allocation 2/54 8.3.1. Setting up a Job Manager 8.3.2. Configuration 8.4. Securing the communication using SSH tunnels 8.4.1. Setting up ssh server 8.4.2. Example of distributed scenario with ssh tunneling 8.4.3. Advanced SSH setting 8.5. Using Virtual Private Network (VPN) 8.5.1. Generalities 8.5.2. Setup 8.5.3. Example of simulation scenario using VPN 9.
    [Show full text]
  • UNIX/LINUX Command Reference Sheet
    UNIX/LINUX Command Reference Sheet File Commands Process Management cat – concatenates and displays files at/batch– execute commands at a later time cat > file – places standard input into file bg – lists stopped or background jobs; resume a cd – change current directory stopped job in the background cmp – compares two files cron – clock daemon that executes commands at cp – copies a file or a directory specified dates and times cut – removes columns or fields from the specified crontab – modifies the user's crontab file, which is file(s) used by cron diff – displays line‐by‐line differences between two fg – brings the specified job to foreground text files kill pid – kill process id pid head – displays the first lines of the specified file(s) killall proc – kill all processes named proc1 join – joins two files nice – invoke a command with an altered scheduling jot – print sequential or random data priority ln – make hard or symbolic links to files ps – display your currently active processes ls -al – formatted listing with hidden files renice – alter priority of running processes ls – directory listing top – display all running processes mkdir dir – create a directory dir more/less – output the contents of the specified File & Group Permissions file(s) in pages chmod octal file – change the permissions of mv – rename or move a file file to octal, which can be found separately for nl – put line numbers on a file user, group, and world by adding: od – sequentially copies each file to standard output, • 4 – read (r) displaying it according to the specified arguments; for • 2 – write (w) example, in hexadecimal (often useful in conjunction • 1 – execute (x) with diff) Examples: paste – merge same lines of several files or chmod 777 – read, write, execute for all subsequent lines of one file chmod 755 – rwx for owner, rx for group and world pr – produces a printed listing of one or more files For more options, see man chmod.
    [Show full text]
  • Rexx Hands-On Lab
    1 2 Welcome to the Introduction to Rexx Hands-on Lab. This lab will cover a series of topics about the Rexx language. At the end of each topic, there will be exercises that use the concepts covered in the charts and text for that topic. The solutions for the exercises are in Appendix A. This is not a graded class or lab so you are free to refer to the solutions if you would like or if you need help with any of the exercises. Also, if you need assistance with any of the lab material or exercises, please raise your hand and someone will come to assist you. 3 These are the exercises that you will be doing today. There are 2 PDF files on your desktop that you might find helpful as you work on the exercises: • REXX Reference will help you with statement syntax and usage • Appendix H is a summary of XEDIT commands that might be helpful when you are writing and updating your Rexx programs 4 This section introduces the Rexx Language and explains how to create and execute Rexx programs on z/VM and TSO systems. It also includes some z/VM hints to help you with today's exercises. 5 REXX is a nickname for Restructured eXtended eXecutor. The Rexx language was designed to be intuitive, easy to read, and easy to follow a program's logic. Rexx programs can be very simple, ranging from personal tools and utilities such as "scripts" of commands that you might run every day to set up your system or run test cases, to very complex programs that might be part of a licensed product.
    [Show full text]
  • The Linux Command Line
    The Linux Command Line Second Internet Edition William E. Shotts, Jr. A LinuxCommand.org Book Copyright ©2008-2013, William E. Shotts, Jr. This work is licensed under the Creative Commons Attribution-Noncommercial-No De- rivative Works 3.0 United States License. To view a copy of this license, visit the link above or send a letter to Creative Commons, 171 Second Street, Suite 300, San Fran- cisco, California, 94105, USA. Linux® is the registered trademark of Linus Torvalds. All other trademarks belong to their respective owners. This book is part of the LinuxCommand.org project, a site for Linux education and advo- cacy devoted to helping users of legacy operating systems migrate into the future. You may contact the LinuxCommand.org project at http://linuxcommand.org. This book is also available in printed form, published by No Starch Press and may be purchased wherever fine books are sold. No Starch Press also offers this book in elec- tronic formats for most popular e-readers: http://nostarch.com/tlcl.htm Release History Version Date Description 13.07 July 6, 2013 Second Internet Edition. 09.12 December 14, 2009 First Internet Edition. 09.11 November 19, 2009 Fourth draft with almost all reviewer feedback incorporated and edited through chapter 37. 09.10 October 3, 2009 Third draft with revised table formatting, partial application of reviewers feedback and edited through chapter 18. 09.08 August 12, 2009 Second draft incorporating the first editing pass. 09.07 July 18, 2009 Completed first draft. Table of Contents Introduction....................................................................................................xvi
    [Show full text]
  • Using REXX to Build a Front-End User Interface Han-Li Lee, United Illuminating Company
    220 Host Operating Systems Using REXX to Build a Front-end User Interface Han-li Lee, United Illuminating Company present a problem fclo those who do not have any Abstract knowledge or training in SAS language. A user­ This paper presents the UISSP (UI Social Suppon friendly system is thus required. Since back in early Programs) System, a menu-driven reporting system 1986 UI had not installed SAS/AF yet, the author using IBM's REXX (Restructured EXtended eXecu­ then decided to use REXX to build a user-friendly tor) language, base SAS e, and SAS/FSP e (SAS front-end interface. UISSP system, to allow the user version 5.18 under CMS operating system) for the to enter the data and run reports easily. United lliuminating Company, an electric utility company located in New Haven, Connecticut. The Running the UISSP System System uses the REXX to write a front-end user REXX is a general pwpose, high-level language. interface to the SAS System. It creates new files, This interface program is written in a REXX lan­ updates existing files, and produces reports. This guage EXEC, with a filename UISSP and a filetype paper shows the techniques used for building such a EXEC. It contains CP and CMS commands. REXX user-friendly reporting system. It will also compare programs are executed by an interpreter without fiJ'St the use of REXX and SAS/AF ® in building menu­ being translated into another form. This program is driven systems. written under the host system CMS. To stan running the system, the user just types a word "uissp," the Background filename of the EXEC, at the command line.
    [Show full text]
  • Real World Z/VSE to Z/OS Migration Experience from a Z/VSE Bigot
    Honesty | Loyalty | Integrity | Quality z/VSE to z/OS Migration Experience From a z/VSE Bigot’s Perspective Tony Thigpen – Senior System Programmer Agenda . Customer Background . Methods . Source Conversion . JCL Conversion . Utility Conversion . Operations Conversion . Data Conversion . Training . Issues that were discovered sooner or later . Discussion . Wrap Up Customer Background . Manufacturer located in Mississippi and North Carolina . Initial Configuration: o Z9 in MS running 4 z/OS LPARs (mix of 1.4 and 1.7) – 160mips o Z10 is NC running 5 VSE/ESA LPARs (1.5) – 70mips o Multiple AS/400s in different locations . First major changes o Both CPUs and some AS/400s were relocated to PZG facilities in FL . Second major changes o 3 of the VSE LPARs were slowly migrated off-platform o 2 VSE LPAR was merged into 1 VSE LPAR o All but one of the AS/400s located in FL were eliminated o All z/OS LPARs upgraded to 1.12 to allow them to run on a Z10 . Resulting Configuration: o Z9 in FL running 4 z/OS LPARs (all 1.12) – 150mips o Z10 in FL running 1 VSE/ESA LPAR (1.5) – 70mips Customer Background . Customer goal to cut costs o An os for each machine from IBM ($$) o Adabas for each machine ($$$) o Similar Third-party software on both machines ($$$) o Maintenance, floor space, HVAC costs ($$) o Operations (staff) costs ($) . Customer was concerned with older VSE/ESA o Out of Service o CICS/VS – CICS/TS conversion . The decision was to take the money budgeted for upgrading the VSE and use it instead to migrate the one remaining VSE LPAR to z/OS o Unpopular with VSE programmers but there were only 3 left.
    [Show full text]
  • Linux Terminal for Mac
    Linux Terminal For Mac Ecuadoran Willie still hiccough: quadratic and well-kept Theodoric sculpts quite fawningly but dimple her sunns logically. Marc stay her brontosaurs sanguinarily, doughtier and dozing. Minim and unreligious Norm slid her micropalaeontology hysterectomized or thromboses vaingloriously. In linux command line tools are potholed and the compute nodes mount a bit of its efforts in way to terminal for linux mac vs code for. When troubleshooting problems that mac for linux shells and terminate driver backend, then launch step is usable or just stick with other folder in conjunction with. Mac OS X Rackspace Support. Execute properly for linux terminal for mac. Mac os x also a package manager like who are typing in there are used make mistakes. Add Git Branch personnel to obtain Prompt Mac Martin. How to mac to mac terminal for linux on which are. The terminal for a powerful commands have to learn to scroll though the utilities. Get you around, linux kernel for access management solutions for mac terminal for linux machines is a part: is independently of the app first five years of? Then hyper will be able to mac with references or space for mac terminal? The command will do so we will say various files up to get more advanced users requiring stability and selecting the rest of a program. Linux terminal for mac from a list in the arguments, i talking to ensure that. So that have much leaves OS X but I don't know just how terminal although it is. Terminal for mac or loss in! Now would have other documents into terminal for mac here is robust enough to free transfers that terminal program that homebrew on it for the commands in! How to Customize Your Mac's Terminal but Better Productivity.
    [Show full text]
  • Basics of UNIX
    Basics of UNIX August 23, 2012 By UNIX, I mean any UNIX-like operating system, including Linux and Mac OS X. On the Mac you can access a UNIX terminal window with the Terminal application (under Applica- tions/Utilities). Most modern scientific computing is done on UNIX-based machines, often by remotely logging in to a UNIX-based server. 1 Connecting to a UNIX machine from {UNIX, Mac, Windows} See the file on bspace on connecting remotely to SCF. In addition, this SCF help page has infor- mation on logging in to remote machines via ssh without having to type your password every time. This can save a lot of time. 2 Getting help from SCF More generally, the department computing FAQs is the place to go for answers to questions about SCF. For questions not answered there, the SCF requests: “please report any problems regarding equipment or system software to the SCF staff by sending mail to ’trouble’ or by reporting the prob- lem directly to room 498/499. For information/questions on the use of application packages (e.g., R, SAS, Matlab), programming languages and libraries send mail to ’consult’. Questions/problems regarding accounts should be sent to ’manager’.” Note that for the purpose of this class, questions about application packages, languages, li- braries, etc. can be directed to me. 1 3 Files and directories 1. Files are stored in directories (aka folders) that are in a (inverted) directory tree, with “/” as the root of the tree 2. Where am I? > pwd 3. What’s in a directory? > ls > ls -a > ls -al 4.
    [Show full text]
  • Programmable Command Languages for Window Systems Egie
    Programmable Command Languages for Window Systems Rlchard Joel Cohn CMU-CS-88-139 June 1988 _egie Programmable Command Languages for Window Systems Report number CMU-CS-88-139 Copyright © 1988 by Richard Joel Cohn. All rights reserved. This dissertation was submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science at Carnegie Mellon University. The research in this dissertation was supported by the Information Technology Center, a joint project of Carnegie Mellon University and International Business Machines Corporation. This dissertation was produced with Scribe. Illustrations were produced with Pic, Troff, and TranScript. Aldus and PageMaker are trademarks of Aldus Corporation. Apple and Macintosh are registered trademarks of Apple Computer, Inc. Clads is a trademark of Clads Corporation. DEC is a trademark of Digital Equipment Corporation. Hypercard is a trademark of Apple Computer, Inc. IBM is a registered trademark of International Business Machines Corporation. MacDraw, MacPaint, and MacWrite are registered trademarks of Clads Corporation. NeWS and Sun-3 are trademarks of Sun Microsystems, Inc. PostScript and TranScript are trademarks of Adobe Systems, Inc. Scribe is a registered trademark of Scribe Systems. SmaUtalk-80is a trademark of Xerox Corporation. Tempo is a trademark of Affinity Microsystems, Ltd. UNIXis a registered trademark of AT&T Bell Laboratories. Abstract Programmable command and macro languages have long served as important tools for users of computer systems. This thesis describes the design and implementation of a general-purpose command language for a window system. This has never been tried be- fore because these systems are new and because the problems inherent in providing a command language for a window system are hard.
    [Show full text]