Shell Polishing

Total Page:16

File Type:pdf, Size:1020Kb

Shell Polishing Command Line LINUXUSER www.photocase.com Bash tricks SHELL POLISHING A few basic tricks can liven up the command line and add a dash of hour format) in front of the user and computer names, followed by the cur- color to your console. BY HEIKE JURZIK rent working directory, you can assign the variable temporarily by doing this: he shell is the command line in- huhn@huhnix:~> terpreter that interfaces between $ export PS1="[\t]U Tthe user and the system. Among The prompt tells you your user ID, the \u@\h:\w> " other things it interprets commands, name of the computer you are working [19:11:06] huhn@huhnix:~> wildcards and variables, links com- on, and the current working directory mands, and passes program output in to (this is the home directory for the cur- The escape sequences used here are \t other tools or to files. Besides the Bourne rent user in our example, denoted by the (time in 24-hour format), \u (username Shell (Sh), Korn Shell (Ksh), C Shell tilde character). If you are working as of the logged in user), \h (hostname up (Csh), and Z Shell (Zsh), the Bourne the system administrator, root, the to the first dot) and \w (current working Again Shell, or Bash for short, plays a prompt will look slightly different – on directory). Special escape sequences prominent role on Unix-style systems – most systems you can tell you are root give you the ability to color the prompt, it has long established itself as the stan- by the pound sign in the prompt (#): assigning green to a normal user prompt, dard shell on Linux. Working with Bash and red to the administrator’s prompt, is a lot more fun if you modify the huhnix:~ # for example. prompt to suit your personal prefer- The Bash manpage has a full list of es- ences, if you are familiar with the many Users can modify the prompt to display cape sequences; and you might also like keyboard shortcuts, and if you add more the date and time, the computer uptime, to check out the Bash Prompt Howto [1]. functionality by defining your own or to use different colors – a few steps aliases and environmental variables. are all it takes to set up your individual Good Memory working environment. The environmen- Bash has a good memory, storing user Attention! tal variable responsible for the appear- input in the history (a file called Commands are typically entered at the ance of the prompt is PS1 (see the “Ev- ~/.bash_history), and letting users recy- shell prompt. A typical prompt looks like erything is Variable” box). If you would cle commands on screen. Pressing the this: like to display the current time (in 24- [Up arrow] key displays the last com- WWW.LINUX - MAGAZINE.COM ISSUE 70 SEPTEMBER 2006 87 LINUXUSER Command Line Type the command (or part of shell (and other programs). To add ver- the command) you are look- satility to this chaos, most distributions ing for at the colon. Bash will do their own thing here, and assign dif- complete commands while ferent priorities to configuration files, or you are typing so that just a include yet more files. few letters might locate the Using SSH to log in at a virtual con- command you are looking for. sole launches a login shell, which is To run a command you have prefaced by a minus sign in the process found using this approach, list: just press Enter. Alternatively, keep pressing [Ctrl]+ [R] $ ps auxwww | grep bash until you find what you are huhnix 3778 0.0 0.3 3056U looking for. Pressing [Esc] lets 1652 tty1 Ss+ May28 0:00U you modify the command be- -bash fore running it. huhnix 4193 0.0 0.3 3068U 1672 pts/1 Ss May28 0:00U Figure 1: Everything is variable – “env” outputs a com- Context /bin/bash plete list of Bash environmental variables. The functions we have looked at thus far help you The login shell first checks the user’s mand to be typed on your screen. Press- find commands, but taken completely home directory for a ~/.bash_profile. ing the key multiple times takes you out of context. To display more complex If this file is missing, bash looks for farther back in time, and pressing the processes on screen, you can either view ~/.bash_login, and then for /etc/profile [Down arrow] key takes you closer to the history file (~/.bash_history), or run or ~/.profile. the present day. You can modify com- the shell builtin fc (“Fix Command”). In mands that you recycle in this way, and combination with the -l flag, this tool Interactive Shells run them again by pressing Enter. outputs the last 17 commands by de- In addition to this, there are interactive Of course, Bash’s memory is only as fault. You can add a number to change shells – such as the ones launched good as you tell it to be in the HISTSIZE the default. For example, fc -l -5 outputs from within other shells. These include environmental variable (see the “Every- the last five commands. Xterms or other console programs on thing is Variable” box). You can ask the The script tool provides an alternative graphical user interfaces. Preferences shell to tell you how many slots it has approach to logging a shell session. You for these shells are stored in the private reserved for commands: could type script MyLogfile before ~/.bashrc, or in the system global /etc/ launching into an extended shell hack, bash.bashrc file, where you also add $ echo $HISTSIZE to record any commands you enter and the alias definitions and environmental 500 the output they create. You can quit the variables discussed in this article. practical logger by pressing [Ctrl]+[D]. Whenever you modify your own When the shell hits this threshold, the ~/.bashrc, you either need to launch a commands at the top of the list start to Bash Configuration Files new shell, or enter source ~/.bashrc to disappear to make way for new ones. Bash comes with a collection of start parse the changes. You can shorten the To avoid wearing out your [Up arrow] files that modify the behavior of the command by entering ~/.bashrc. key, Bash includes a search function. If The alias builtin is an- you press the keyboard shortcut [Ctrl-R] other practical feature that or [Ctrl-S] (see the “Bash Keyboard lets users define commands Shortcuts” box), you can search for- they use regularly, along wards or backwards through the history with their typical choice of for a command. The prompt changes to options, and assign a reflect this, for example, pressing [Ctrl- shorter and more intuitive R] puts the following prompt on your name to the whole kitten screen: caboodle. Most distri- butions define a few de- (reverse-i-search)`': fault aliases – to find out which aliases your version of Bash knows, type the GLOSSARY alias command at the Builtin: Builtins are not independent ex- prompt: ecutables, but integrated shell com- mands. Builtins do not have their own $ alias manpage, but are typically described in Figure 2: Environmental variables give users the ability to alias ls='ls U the Bash documentation (man bash). modify the behavior of Bash and many other programs. --color=auto' 88 ISSUE 70 SEPTEMBER 2006 WWW.LINUX - MAGAZINE.COM Command Line LINUXUSER To define an alias for the current shell ple, unalias ll would ditch the alias we You can run the export command to session, just type the alias command, just defined. To make an alias persistent, set a variable. For example, if you want followed by the name for the new short- you need to add the definition to your to run a program in a different language cut, an equals sign, and the command ~/.bashrc, and parse the file. just this once, temporarily set the LC_ (in quotes), as in: ALL variable, and add the executable Everything is Variable name after a blank. The alias ll='ls -l' Environmental variables let you extend the shell’s feature scope, and modify the LC_ALL=fr_FR firefox The unalias command lets you drop any behavior of certain other programs. The shortcuts you no longer need. For exam- system comes with a set of default vari- command would launch the popular ables, such as the HIST- browser in French for a change. You Table 1: Bash Keyboard Shortcuts SIZE example (in the can also use the unset command to [Ctrl-A] Go back to the start of the input. “Good Memory” section). disable a variable set for the current [Ctrl-E] Jump to the end of the input. You can use the echo com- shell, as in: [Esc-B] Go back one word. mand to output the value [Esc-F] Go forward one word. of the variable, remember- unset LS_COLORS [Ctrl-B] Go back one character. ing to preface the variable [Ctrl-F] Go forward one character. with a dollar sign: To set a variable persistently, add the [Ctrl-K] Delete from the cursor position to the end of export command to ~/.bashrc. Figure 2 the input. echo $HISTSIZE shows a commented Bash setup file with [Ctrl-U] Delete from the cursor position to the start of various examples of useful variables. ■ the line. If you are interested in a [Ctrl-W] Delete the word to the left of the cursor. complete list of all Bash INFO [Ctrl-T] Swap the two characters to the left and below environmental variables, [1] Bash Prompt HOWTO: the cursor. you can type env at the http:// www. tldp.
Recommended publications
  • 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]
  • Programming Project #2 Due: Thursday, May 13Th, 2004, 11:59 Pm
    CS155: Computer Security Spring 2004 Programming Project #2 Due: Thursday, May 13th, 2004, 11:59 pm 1 Introduction 1.1 Summary In this project, you will write Josh, the journaling operator shell. Josh is a setuid-root shell that allows users to undertake a subset of root’s capabilities. Your starting point is OSH, a minimal shell developed by Gunnar Ritter. You may work alone, or in pairs. You should not collaborate with others outside your group. You will use the Boxes system again. Remember to test your Josh in a closedbox. This as- signment specification is quite long, but much of it is intended to clarify points of confusion raised by previous years’ students. Please be sure to read it carefully before beginning to code. 1.2 The Problem As discussed in class, the classical Unix permissions model does not manage privilege delegation effectively. To perform routine administrative tasks (such as cleaning out the /tmp directory), one must possess the root password, and can therefore perform other, undesirable actions (such as reading users’ mail). This limitation manifests itself most acutely in large Unix installations, where there are typically many administrators tasked with various duties. Finer granularity of access is required for such systems, along with the ability to correctly log the important events for post-attack analysis. Various systems have been devised to overcome this limitation, and allow unprivileged users to un- dertake some subset of root’s capabilities. A commonly-used example is Sudo (http://www.sudo.ws/). We will take an approach more like that taken by OSH, the Operator Shell by Michael Neuman.
    [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]
  • Processes in Linux/Unix
    Processes in Linux/Unix A program/command when executed, a special instance is provided by the system to the process. This instance consists of all the services/resources that may be utilized by the process under execution. • Whenever a command is issued in unix/linux, it creates/starts a new process. For example, pwd when issued which is used to list the current directory location the user is in, a process starts. • Through a 5 digit ID number unix/linux keeps account of the processes, this number is call process id or pid. Each process in the system has a unique pid. • Used up pid’s can be used in again for a newer process since all the possible combinations are used. • At any point of time, no two processes with the same pid exist in the system because it is the pid that Unix uses to track each process. Initializing a process A process can be run in two ways: 1. Foreground Process : Every process when started runs in foreground by default, receives input from the keyboard and sends output to the screen. When issuing pwd command $ ls pwd Output: $ /home/geeksforgeeks/root When a command/process is running in the foreground and is taking a lot of time, no other processes can be run or started because the prompt would not be available until the program finishes processing and comes out. 2. Backround Process : It runs in the background without keyboard input and waits till keyboard input is required. Thus, other processes can be done in parallel with the process running in background since they do not have to wait for the previous process to be completed.
    [Show full text]
  • What's a Script?
    Linux shell scripting – “Getting started ”* David Morgan *based on chapter by the same name in Classic Shell Scripting by Robbins and Beebe What ’s a script? text file containing commands executed as a unit “command” means a body of code from somewhere from where? – the alias list, in the shell’s memory – the keywords, embedded in the shell – the functions that are in shell memory – the builtins, embedded in the shell code itself – a “binary” file, outboard to the shell 1 Precedence of selection for execution aliases keywords (a.k.a. reserved words) functions builtins files (binary executable and script) – hash table – PATH Keywords (a.k.a. reserved words) RESERVED WORDS Reserved words are words that have a special meaning to the shell. The following words are recognized as reserved when unquoted and either the first word of a simple command … or the third word of a case or for command: ! case do done elif else esac fi for function if in select then until while { } time [[ ]] bash man page 2 bash builtin executables source continue fc popd test alias declare fg printf times bg typeset getopts pushd trap bind dirs hash pwd type break disown help read ulimit builtin echo history readonly umask cd enable jobs return unalias caller eval kill set unset command exec let shift wait compgen exit local shopt complete export logout suspend * code for a bash builtin resides in file /bin/bash, along with the rest of the builtins plus the shell program as a whole. Code for a utility like ls resides in its own dedicated file /bin/ls, which holds nothing else.
    [Show full text]
  • UNIX 2 Enhancing Your UNIX Skills
    UNIX 2 Enhancing your UNIX Skills Workbook February 2017 Associated Workbooks: UNIX 2: Practical Exercise - 3059-2016 UNIX 2: Solution - 3060-2016 Document Number: 3133-2016 1 Contents Chapter 1. Deeper UNIX Unix 1 - Revision .............................................................................................................................1 ssh and logout ............................................................................................................................1 files, directories and pathnames ...................................................................................................1 more and nano ...........................................................................................................................1 permissions ................................................................................................................................1 lpr, enscript, lpq and lprm ............................................................................................................1 Unix 1 - Revision .............................................................................................................................2 shells ..........................................................................................................................................2 filename completion (<tab>) .........................................................................................................2 history mechanism ......................................................................................................................2
    [Show full text]
  • Linux Shell Scripting Tutorial V2.0
    Linux Shell Scripting Tutorial v2.0 Written by Vivek Gite <[email protected]> and Edited By Various Contributors PDF generated using the open source mwlib toolkit. See http://code.pediapress.com/ for more information. PDF generated at: Mon, 31 May 2010 07:27:26 CET Contents Articles Linux Shell Scripting Tutorial - A Beginner's handbook:About 1 Chapter 1: Quick Introduction to Linux 4 What Is Linux 4 Who created Linux 5 Where can I download Linux 6 How do I Install Linux 6 Linux usage in everyday life 7 What is Linux Kernel 7 What is Linux Shell 8 Unix philosophy 11 But how do you use the shell 12 What is a Shell Script or shell scripting 13 Why shell scripting 14 Chapter 1 Challenges 16 Chapter 2: Getting Started With Shell Programming 17 The bash shell 17 Shell commands 19 The role of shells in the Linux environment 21 Other standard shells 23 Hello, World! Tutorial 25 Shebang 27 Shell Comments 29 Setting up permissions on a script 30 Execute a script 31 Debug a script 32 Chapter 2 Challenges 33 Chapter 3:The Shell Variables and Environment 34 Variables in shell 34 Assign values to shell variables 38 Default shell variables value 40 Rules for Naming variable name 41 Display the value of shell variables 42 Quoting 46 The export statement 49 Unset shell and environment variables 50 Getting User Input Via Keyboard 50 Perform arithmetic operations 54 Create an integer variable 56 Create the constants variable 57 Bash variable existence check 58 Customize the bash shell environments 59 Recalling command history 63 Path name expansion 65 Create and use aliases 67 The tilde expansion 69 Startup scripts 70 Using aliases 72 Changing bash prompt 73 Setting shell options 77 Setting system wide shell options 82 Chapter 3 Challenges 83 Chapter 4: Conditionals Execution (Decision Making) 84 Bash structured language constructs 84 Test command 86 If structures to execute code based on a condition 87 If.
    [Show full text]
  • Learning the Bash Shell, 3Rd Edition
    1 Learning the bash Shell, 3rd Edition Table of Contents 2 Preface bash Versions Summary of bash Features Intended Audience Code Examples Chapter Summary Conventions Used in This Handbook We'd Like to Hear from You Using Code Examples Safari Enabled Acknowledgments for the First Edition Acknowledgments for the Second Edition Acknowledgments for the Third Edition 1. bash Basics 3 1.1. What Is a Shell? 1.2. Scope of This Book 1.3. History of UNIX Shells 1.3.1. The Bourne Again Shell 1.3.2. Features of bash 1.4. Getting bash 1.5. Interactive Shell Use 1.5.1. Commands, Arguments, and Options 1.6. Files 1.6.1. Directories 1.6.2. Filenames, Wildcards, and Pathname Expansion 1.6.3. Brace Expansion 1.7. Input and Output 1.7.1. Standard I/O 1.7.2. I/O Redirection 1.7.3. Pipelines 1.8. Background Jobs 1.8.1. Background I/O 1.8.2. Background Jobs and Priorities 1.9. Special Characters and Quoting 1.9.1. Quoting 1.9.2. Backslash-Escaping 1.9.3. Quoting Quotation Marks 1.9.4. Continuing Lines 1.9.5. Control Keys 4 1.10. Help 2. Command-Line Editing 2.1. Enabling Command-Line Editing 2.2. The History List 2.3. emacs Editing Mode 2.3.1. Basic Commands 2.3.2. Word Commands 2.3.3. Line Commands 2.3.4. Moving Around in the History List 2.3.5. Textual Completion 2.3.6. Miscellaneous Commands 2.4. vi Editing Mode 2.4.1.
    [Show full text]
  • Intermediate Linux
    Intermediate Linux th st !!***May subroutine 30 mpi_utils_step_parallel_edge– 31 , 2016 implicit none integer ele, ierr do ele = 1, nfaces Lecturerscall mpi_isend(commvec(ele)%field1(commvec(ele)%out_i1, (in alphabetical order): & & commvec(ele)%out_j1, & Jaakko& Leinonen commvec(ele)%out_k1), & Tomasz& 1, commvec(ele)%mpi_type_out1,Malkiewicz & & commvec(ele)%to_id, commvec(ele)%to_id, & Thomas& MPI_COMM_WORLD, Zwinger send_reqs(ele), ierr) if(ierr /= MPI_SUCCESS) then call pio_abort(ierr) end if call mpi_isend(commvec(ele)%field2(commvec(ele)%out_i2, & & commvec(ele)%out_j2, & & commvec(ele)%out_k2), & & 1, commvec(ele)%mpi_type_out2, & & commvec(ele)%to_id, commvec(ele)%to_id+tag_offset, & & MPI_COMM_WORLD, send_reqs(nfaces+ele), ierr) if(ierr /= MPI_SUCCESS) then call pio_abort(ierr) end if end do #ifdef NONBLOCK do ele = 1, nfaces All material (C) 2016 by the authors. call mpi_irecv(commvec(ele)%field1(commvec(ele)%in_i1, & This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported & commvec(ele)%in_j1, & 1 License, http://creativecommons.org/licenses/by-nc-sa/3.0/ 2 & commvec(ele)%in_k1), & & 1, commvec(ele)%mpi_type_in1, & Program, May 30th 09:30 – 10:00 Morning coffee & registration 10:00 – 10:15 Introduction to the course (whereabouts, etc.) 10:15 – 10:45 Recapping Introduction to Linux (to refresh memory) 10:45 – 11:30 Basic concepts of shells 11:30 – 12:30 Lunch 12:30 – 14:30 Working with the Bash shell 14:30 – 15:00 Coffee 15:00 – 15:45 Bash job management and signals About This Course 15:45 – 16:30 Hands-on exercises & Troubleshooter: Interactive session to deal with open questions and specific problems 3 4 Program, May 31st How We Teach 09:00 – 10:00 Pipes, named pipes and redirecting All topics are presented with interactive demonstrations.
    [Show full text]
  • Shell Variables
    A P P E N D I X ■ ■ ■ Shell Variables This list is excerpted from the bash man page and edited to make a stand-alone document. The following variables are set by bash. BASH Expands to the full file name used to invoke this instance of bash. BASHPID Expands to the process ID of the current bash process. This differs from $$ under certain circumstances, such as subshells that do not require bash to be reinitialized. BASH_ALIASES An associative array variable whose members correspond to the internal list of aliases as maintained by the alias builtin. Elements added to this array appear in the alias list; unsetting array elements causes aliases to be removed from the alias list. BASH_ARGC An array variable whose values are the number of parameters in each frame of the current bash execution call stack. The number of parameters to the current subroutine (shell function or script executed with . or source) is at the top of the stack. When a subroutine is executed, the number of parameters passed is pushed onto BASH_ARGC. The shell sets BASH_ARGC only when in extended debugging mode (see the description of the extdebug option to the shopt builtin in the bash man page). 205 APPENDIX ■ SHELL VARIABLES BASH_ARGV An array variable containing all the parameters in the current bash execution call stack. The final parameter of the last subroutine call is at the top of the stack; the first parameter of the initial call is at the bottom. When a subroutine is executed, the parameters supplied are pushed onto BASH_ARGV. The shell sets BASH_ARGV only when in extended debugging mode (see the description of the extdebug option to the shopt builtin in the bash man page).
    [Show full text]
  • Introduction to the Linux Command Line Interface (Presented Oct
    Dal CSS Geek Labs Introduction to the Linux Command Line Interface (Presented Oct. 18, 2016) Contact information: Corrie Watt ([email protected]) “Graphical user interfaces make easy tasks easy, while command line interfaces make difficult tasks possible.” Original source unknown, quoted in Shotts, W. E. (2012), The Linux Command Line. The shell is a program in your Linux distribution which takes keyboard commands and passes them to the operating system to perform. In the good old days , it was the only user interface available. By learning the text-mode tools, you’ll be able to use Linux’s true power, enabling you to to do simple or complex things very quickly. It will also be a useful thing to know if your Linux or OS-X GUI system ever fails. And, if you ever have to do something with system files, there is no better friend. Resources: 1. https://www.digitalocean.com/community/tutorials/an-introduction-to-the-linux-terminal ...Part 1 of a very good series of tutorials for new Linux users. 2. http://vic.gedris.org/Manual-ShellIntro/1.2/ShellIntro.pdf ...BASH introduction and cheat sheet; download and read (it lists DOS equivalents to Linux commands). 3. https://www.digitalocean.com/community/tutorials/basic-linux-navigation-and-file-management 4. http://www.howtogeek.com/117435/htg-explains-the-linux-directory-structure-explained ...This is an excellent look at the Unix/Linux file system; gives comparison with Windows file system. 5. http://www.howtogeek.com/125157/8-deadly-commands-you-should-never-run-on-linux/ ...No explanation needed; power is wonderful, and Linux gives you absolute power! 6.
    [Show full text]
  • LINUX Commands
    LINUX Commands alias Create an alias apropos Search Help manual pages (man -k) awk Find and Replace text, database sort/validate/index break Exit from a loop builtin Run a shell builtin bzip2 Compress or decompress named file(s) cal Display a calendar case Conditionally perform a command cat Display the contents of a file cd Change Directory cfdisk Partition table manipulator for Linux chgrp Change group ownership chmod Change access permissions chown Change file owner and group chroot Run a command with a different root directory cksum Print CRC checksum and byte counts clear Clear terminal screen cmp Compare two files comm Compare two sorted files line by line command Run a command - ignoring shell functions continue Resume the next iteration of a loop cp Copy one or more files to another location cron Daemon to execute scheduled commands crontab Schedule a command to run at a later time csplit Split a file into context-determined pieces cut Divide a file into several parts date Display or change the date & time dc Desk Calculator dd Data Dump - Convert and copy a file ddrescue Data recovery tool declare Declare variables and give them attributes df Display free disk space diff Display the differences between two files diff3 Show differences among three files dig DNS lookup dir Briefly list directory contents dircolors Colour setup for `ls' dirname Convert a full pathname to just a path dirs Display list of remembered directories du Estimate file space usage echo Display message on screen egrep Search file(s) for lines that match an
    [Show full text]