







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!








This manual was written with the intention of being a helpful guide to Linux users who are trying to become familiar with the Bash shell and basic Linux commands. To make this manual useful to the widest range of people, I decided to release it under a free documentation license, with the hopes that people benefit from it by updating it and re-distributing modified copies. You have permission to modify and distribute this document, as specified under the terms of the GNU Free Documentation License. Comments and suggestions for improvement may be directed to: [email protected].
This document was created using an Open Source office application called Open Office. The file format is non-proprietary, and the document is also published in various other formats online. Updated copies will be available on Vic Gedris' web site [http://vic.dyndns.org/]. For more information on Open Office, please visit http://www.openoffice.org/.
Copyright © 2003 Victor Gedris. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available from the Free Software Foundation's website: http://www.fsf.org/copyleft/fdl.html
Document Version: 1.2, 2003-06-
Before we continue to learn about Linux shell commands, it is important to know that there are many symbols and characters that the shell interprets in special ways. This means that certain typed characters: a) cannot be used in certain situations, b) may be used to perform special operations, or, c) must be “escaped” if you want to use them in a normal way.
Character Description ** (^) Escape character. If you want to reference a special character, you must “escape” it with a backslash first. Example: touch /tmp/filename* / Directory separator, used to separate a string of directory names. Example: /usr/src/linux
. (^) Current directory. Can also “hide” files when it is the first character in a filename. .. Parent directory ~ User's home directory ***** (^) Represents 0 or more characters in a filename, or by itself, all files in a directory. Example: pic*2002 can represent the files pic2002, picJanuary2002, picFeb292002, etc. ? Represents a single character in a filename. Example: hello?.txt can represent hello1.txt, helloz.txt, but not hello22.txt [ ] Can be used to represent a range of values, e.g. [0-9], [A-Z], etc. Example: hello[0-2].txt represents the names hello0.txt, hello1.txt, and hello2.txt | “Pipe”. Redirect the output of one command into another command. Example: ls | more > (^) Redirect output of a command into a new file. If the file already exists, over-write it. Example: ls > myfiles.txt >> Redirect the output of a command onto the end of an existing file. Example: echo “Mary 555-1234” >> phonenumbers.txt < Redirect a file as input to a program. Example: more < phonenumbers.txt ; (^) Command separator. Allows you to execute multiple commands on a single line. Example: cd /var/log ; less messages && Command separator as above, but only runs the second command if the first one finished without errors. Example: cd /var/logs && less messages & Execute a command in the background, and immediately get your shell back. Example: find / -name core > /tmp/corefiles.txt &