Editing
Linux Basics Tutorial
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Special Bash Tools === The following symbols can help make working in Bash easier: * '''!!''': Evaluates to the previous command you entered. You can also add on other text. So, for example, <code>$sudo !!</code> puts <code>sudo</code> before your previous command, and runs it. The use of <code>sudo</code> will be discussed later in this tutorial. * '''&''': Putting this at the end of a command will run that command in the background, meaning you will be able to keep using the same shell to do other commands, while the current command is still running. This is useful if you want to launch an application from the command line, but don't want to be locked out of Bash while it's running. * '''&&''': This lets you run two commands in one. For example, <code>$ echo firstcommand && echo secondcommand</code> will output the two arguments, each on its own line. * '''>''': This will take the output of a command on its left, and put it into a file specified on its right. For example, <code>$ echo hi > tmp.txt</code> will put the word "hi" into the file tmp.txt, creating it if it doesn't exist. * '''|''': This will take the output of a command on its left, run the command on the right, and feed that output into the right command's input. This is a more complicated one, but it's particularly useful for commands that look for "matches" of a pattern in some block of text, like <code>grep</code>. * '''*''': This is the "wildcard" character, acting like a keyword that matches anything. For example, <code>$ rm *</code> will remove all files from your working directory. <code>$ rm *.txt</code> will only remove files ending in ".txt".
Summary:
Please note that all contributions to RHLUG Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
RHLUG Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information