Difference: GuillermoFidalgoSandbox (6 vs. 7)

Revision 72016-05-10 - GuillermoFidalgo

Line: 1 to 1
 
META TOPICPARENT name="Main.GuillermoFidalgo"

Basic Linux commands


Here I will write some of the basic commands we use in the terminal and what they do.

1) The mkdir command: This will create a folder ( i.e. make a directory).

syntax: mkdir 'mydocuments'

2) mkdir --verbose: This will create a directory and you will be told by the computer that it has been created

for example:

Screenshot_from_2016-03-15_110608.png

3) If you want to check the list of files or directories in your current directory : ls or ls -l)

If you type ls -l you'll see a list along with information about it.

4) cp

This is the copy command.

5) man

This is one of the most important commands you will use. This is the manual command and it is used to find detailed information about other commands including itself.

For example if you want more details about the copy command you would write:

man cp

You should see something like this:

mandisplay.png

6) nano

The nano command is a small, free and friendly editor which aims to replace Pico, the default editor included in the non-free Pine package.

Rather than just copying Pico's look and feel, nano also implements some missing

(or disabled by default) features in Pico, such as "search and replace" and "go to line and column number".

The information comes from following website Linux tutorials .


CMS Data Analysis Pre-Exercises (First Set)

Here I will talk about my experience learned from these exercises, which have the purpose to prepare students who,like me, will be exposed to CMS Data Analysis.

At the bottom of this topic I will post the link to the original page for those who want to participate.

I will not go into the details (that's why I posted the original link), but the first thing we have to do is to get a CERN account. After that you will need to get the necessary certificates and finally a github account. NOTE ( In this and every other execercise I used the UPRM syntax).

After you've done these things we are ready to begin !

In the first exercise we need to do a simple Cut and Paste. For this I used the cp command to do this we sign in to the corresponding cluster (in my case UPRM) and copied the file named runThisCommand.py

Here's what you write:

Changed:
<
<
ssh -Y USERNAME@alpha00.hep.uprm.edu
>
>
ssh -Y USERNAME@alpha00.hep.uprm.edu
 
Changed:
<
<
cp ~malik/CMSTutorial/runThisCommand.py .
>
>
cp ~malik/CMSTutorial/runThisCommand.py .
  and then cut and paste the following and then hit return
Deleted:
<
<
 
./runThisCommand.py "asdf;klasdjf;kakjsdf;akjf;aksdljf;a" "sldjfqewradsfafaw4efaefawefzdxffasdfw4ffawefawe4fawasdffadsfef"

The response should be your username followed by alphanumeric string of characters unique to your username, for example for a user named malik:

(If done succesfully the output should be )

Deleted:
<
<
 
success: malik znyvx 
Added:
>
>

Exercise 2

  After this we move on to the second exercise which is a simple edit exercise.

First we have to copy the file

Deleted:
<
<
 
cp ~malik/CMSTutorial/editThisCommand.py .

Here we will open this file using the "nano" command and edit the text inside it. In this case we are asket to change the 11th line and add "#" at the start of the line. After this save the file and copy paste the following:

Deleted:
<
<
 
./editThisCommand.py

Added:
>
>
Again like the last exercise there is a specific output if done correctly (check with the original page).

Exercise 3

In this exercise we will setup the github account and create a Working Directroy

mkdir YOURWORKINGAREA
cd YOURWORKINGAREA
### If you are using csh shell
setenv SCRAM_ARCH slc6_amd64_gcc491
### If you are using Bash shell
export SCRAM_ARCH=slc6_amd64_gcc491
cmsrel CMSSW_7_3_0_pre1
cd CMSSW_7_3_0_pre1/src
cmsenv
git cms-init

You will be prompted to fill some information for your github account, after this Run the following command:

echo $CMSSW_BASE

We have finished the exercise.

I will skip Exercise 4 since I did not have the certificates necessary for this part.

 The original page is here

-- Guillermo Fidalgo - 2016-05-10


Comments


<--/commentPlugin-->

META FILEATTACHMENT attachment="Screenshot_from_2016-03-15_110318.png" attr="" comment="" date="1458054270" name="Screenshot_from_2016-03-15_110318.png" path="Screenshot from 2016-03-15 11:03:18.png" size="34629" user="GuillermoFidalgo" version="1"
META FILEATTACHMENT attachment="Screenshot_from_2016-03-15_110608.png" attr="" comment="" date="1458054430" name="Screenshot_from_2016-03-15_110608.png" path="Screenshot from 2016-03-15 11:06:08.png" size="25184" user="GuillermoFidalgo" version="1"
META FILEATTACHMENT attachment="mandisplay.png" attr="" comment="" date="1462849943" name="mandisplay.png" path="mandisplay.png" size="49946" user="GuillermoFidalgo" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback