Cheat Sheets

UNIX/Linux
Action Command
List directory contents
   long listing
   list all files (including hidden)
ls
ls -l
ls -a
Change directory
   go up one level
   jump to home directory
cd <desired directory>
cd ..
cd
Copy file cp <source> <destination>
Move file mv <source> <destination>
Remove file rm <filename>
Create new directory mkdir <directory name>
Remove directory  rmdir <directory name>



ROOT

ROOT syntax is interpreted C++. Everything will make sense if you know C++, but will be quite confusing if you don't.  If you have never used C++, it might be helpful to look at this introductory C++ tutorial.   

In the following table, I give the full C++ form of the commands (these will work in compiled mode). There are also abbreviated versions which may be used on the ROOT command line, but it's a bad idea to get too comfortable with these, as they will not work in C++ outside of ROOT.

Action Command
Quit ROOT
   (If ROOT is unresponsive, start adding "q"s)
      Really quit ROOT
      QUIT ROOT, I mean it!!!
.q
 
  .qqq
  .qqqqq
Load a file TFile *f = new TFile("file.root");
View contents of file f->ls();
Create histogram "h1" with 100 bins,
  ranging from 0 to 5.
TH1F *h1 = new TH1F("h1", "My histogram", 100, 0.0, 5.0);
Draw histogram "h1" h1->Draw();
Close file f->Close();