Linux Bash Shell Cheat Sheet

Powerful Essays
Topics: File system
freeworld.posterous.com

Linux Bash Shell
Cheat Sheet
(works with about every distribution, except for apt-get which is Ubuntu/Debian exclusive)

Legend:
Everything in “” is to be replaced, ex: --> iLovePeanuts.txt
Don't include the '=' in your commands
'..' means that more than one file can be affected with only one command ex: rm file.txt file2.txt movie.mov .. ..

Linux Bash Shell Cheat Sheet
Basic Commands
Basic Terminal Shortcuts

Basic file manipulation

CTRL L = Clear the terminal
CTRL D = Logout
SHIFT Page Up/Down = Go up/down the terminal
CTRL A = Cursor to start of line
CTRL E = Cursor the end of line
CTRL U = Delete left of the cursor
CTRL K = Delete right of the cursor
CTRL W = Delete word on the left
CTRL Y = Paste (after CTRL U,K or W)
TAB = auto completion of file or command
CTRL R = reverse search history
!! = repeat last command

cat = show content of file
(less, more) head = from the top
-n

CTRL Z = stops the current command (resume with fg in foreground or bg in background)

cp image.jpg newimage.jpg = copy and rename a file

Basic Terminal Navigation

cp cp cp cp image.jpg / = copy to folder image.jpg folder/sameImageNewName.jpg
-R stuff otherStuff = copy and rename a folder
*.txt stuff/ = copy all of * to folder

mv mv mv mv mv

file.txt Documents/ = move file to a folder = move folder in folder filename.txt filename2.txt = rename file stuff/newfileName
/ .. = move folder up in hierarchy

rm rm rm rm .. = delete file (s)
-i .. = ask for confirmation each file
-f = force deletion of a file
-r / = delete folder

ls ls ls ls ls

-a = list all files and folders = list files in folder
-lh = Detailed list, Human readable
-l *.jpg = list jpeg files only
-lh = Result for file only

cd = change directory if folder name has spaces use “ “ cd / = go to root cd .. = go up one folder, tip: ../../../ du -h: Disk usage of folders, human readable du -ah:

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Shell Scripting in Linux

    • 34034 Words
    • 137 Pages

    Shell Scripting Hamish Whittal Shell Scripting by Hamish Whittal Published 2005-01-25 22:36:19 Copyright © 2004 The Shuttleworth Foundation Unless otherwise expressly stated, all original material of whatever nature created by the contributors of the Learn Linux community, is licensed under the Creative Commons [http://creativecommons.org/] license Attribution-ShareAlike 2.0 [http://creativecommons.org/licenses/by-sa/2.0/] [http://creativecommons.org/licenses/by-sa/2.0/]. What follows…

    • 34034 Words
    • 137 Pages
    Satisfactory Essays
  • Good Essays

    Cheat Sheet

    • 1329 Words
    • 6 Pages

    types of atoms associated by chemical bonds Isotopes - variant forms of an element Radioactivity - nucleus of an atom falls apart, releasing high-energy particles and gamma rays that destroy other atoms Atoms form bonds to fill outer electron shells and…

    • 1329 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    Cheat Sheet

    • 301 Words
    • 2 Pages

    Year 9 Science SELF-EVALUATION – Term 1 For your continued development in Science it is important we set goals and evaluate our study behaviours and performance. Your honesty is much appreciated for the continued improvement in teaching and learning. Name: ______Zac Malone___________________ NOTE: 1 – Very Low 10 – Very High How hard did I work at achieving my science goal for term 1 1……………………3……………………………………………………………….……….10 Did I continually evaluate my study habits…

    • 301 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    cheat sheet

    • 1437 Words
    • 5 Pages

    1. The sociological perspective, as a way of thinking about the world, includes the sociological imagination from C. Wright Mills, the beginner’s mind from Bernard McGrane, and the idea of culture shock from anthropology. Explain what all three of these concepts have in common. Response: All three of these concepts have in common are the idea of breaking down social barriers to gain a different perspective on culture people and behaviors. When a person is in a new area where the culture is different…

    • 1437 Words
    • 5 Pages
    Good Essays
  • Better Essays

    Cheat Sheet

    • 3020 Words
    • 12 Pages

    Cheat Sheet: Note: UCC governs the sale of goods; NOT SERVICES Offer+acceptance+consideration=contract Four types of contracts: 1. consideration: when you have a contract for a bargained for exchange where the promisor receives a benefit to the promisee’s detriment; note: benefit/detriment has to induce the promise 2. moral obligation: promise+antecedent benefit (rare) 3. promissory estoppel: a contract exists when a person reasonably relies upon a promise to his detriment 4. form: some contracts…

    • 3020 Words
    • 12 Pages
    Better Essays
  • Good Essays

    cheat sheet

    • 524 Words
    • 3 Pages

    Accrued Interest = x Nominal Return = Real Return = – 1 Real rate of return Compounding = rnominal-inflation rate Current yield = The invoice price is the reported price plus accrued interest The ask price is 101.125 percent of par, so the invoice price is: $1,011.25 + (1/2  $50) = $1,036.25 Effective annual rate on a three-month T-bill: Optimal capital allocation: Y= E(rp)- Rf / A(std)^2portfilio – 1 = (1.02412)4 – 1 = 0.1000 = 10% Effective annual interest rate…

    • 524 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    cheat sheet

    • 266 Words
    • 2 Pages

    QMS 202 Quiz #1 Crib Sheet Inferential statistics is the process of using sample results to draw conclusions about the characteristics of a population Mean: Standard Deviation: If population of individual measurements is normal, x is normal Sample size (n ≥ 30), x is normal To convert any random variable X to standardized normal random variable Z: To determine the percentile using z-score, use normalcdf(lower, upper, mean, standard deviation). To determine Z using…

    • 266 Words
    • 2 Pages
    Satisfactory Essays
  • Better Essays

    Linux: The Kernel And Shell Josh Harkey AIU Online Abstract This manual has been written to explore the many distributions of Linux. It will define some of the components of the OS as they relate to the shell and kernel. It will also go over some of the more popular distributions of Linux and the shells. Finally, it will give a brief overview of some useful commands that can be used in the bash shell. Linux: The Kernel and Shell It is important to know some the inner workings of an operating…

    • 1210 Words
    • 5 Pages
    Better Essays
  • Good Essays

    Cheat Sheet

    • 1557 Words
    • 7 Pages

    Cycle time: Bottleneck| Cycle time = 1/Capacity rate | | Inventory = Throughput Rate x Flow Time | Little’s Law: I = R x T | Inventory Turns (IT) = 1 / Flow time (T) = R / I | BCWS = Budgeted Cost of Work Scheduled BCWC = Budgeted Cost of Work Complete |ACWC = Actual Cost of Work Complete | Cost Variance CV = BCWC – ACWC | Schedule variance SV = BCWC – BCWS | Utilization=Demand /CAPACITY| Inventory Buildup rate IBR|No IBR if no stations limits Throughput rate| Capacity rate = 1 / Cycle…

    • 1557 Words
    • 7 Pages
    Good Essays
  • Good Essays

    Cheat Sheet

    • 3120 Words
    • 13 Pages

    LDR ms Optical detector Optical source Forward-biased photodiode; energy releases photo of light (near-infrared) -Resistance against light -High gain means slower -Limiting resistor is used to keep the intensity is plotted on a log-log response time current within the maximum allowed scale -More sensitive than a rating. - When it’s darker, it will have a photodiode (can pick up smaller -The brightness of the LED depends higher resistance. If it has a changes in light) on the current, and NOT the…

    • 3120 Words
    • 13 Pages
    Good Essays