Difference between revisions of "Linux"

From orch
Jump to: navigation, search
(SSH keys)
(Convert Images)
 
(9 intermediate revisions by the same user not shown)
Line 9: Line 9:
 
</code>
 
</code>
  
== .bashrc ==
+
== Manage your .bashrc ==
  
 +
<code>
 +
  export
 +
</code>
  
 +
<code>
 +
  alias
 +
</code>
 +
 +
Do not forget to source your .bashrc file. This is done automatically when opening a new terminal.
 +
 +
<code>
 +
  source .bashrc
 +
</code>
  
 
== SSH keys ==
 
== SSH keys ==
Line 29: Line 41:
 
</code>
 
</code>
  
Just press enter. You must then copy the public key that you will in <code>.ssh/id_dsa.pub</code> to the file <code>.ssh/authorized_keys</code> of the distant host you want to give access to. This key should have the following format.
+
Just press enter. You must then copy the public key that you will find in <code>.ssh/id_dsa.pub</code> to the file <code>.ssh/authorized_keys</code> of the distant host you want to give access to. This public key should have the following format.
 +
 
 +
<code>
 +
  ssh-dss AAAAB3NzaC................................................................................. login@machine 
 +
</code>
 +
 
 +
 
 +
 
 +
== Convert Images ==
 +
 
 +
<code>
 +
  convert *.png video.gif
 +
</code>
 +
 
 +
 
 +
Make sure to specify the correct dimension for the image (here 840x1188). -160 means the image is to remove 160 units from the right part of the image. (+160 for the left part). -600 means the reduction will be of 600 units from the bottom of the image.
  
 
<code>
 
<code>
   ssh -dss .....
+
   convert 000.png -crop 840x1188-160-600 000_crop.png
  @....local
+
 
</code>
 
</code>

Latest revision as of 16:07, 16 March 2016

Run on multi-procs

  mpirun -np 12 main

  mpirun -np 12 main <log &

Manage your .bashrc

  export 

  alias 

Do not forget to source your .bashrc file. This is done automatically when opening a new terminal.

  source .bashrc

SSH keys

You should first go to your personal repository and generate a new key if there is no id_dsa.pub file in the .ssh directory.

  cd
  ssh-keygen -t dsa

You should get the following message,

  Generating public/private dsa key pair
  Enter file in which to save the key (/home/login/.ssh/id_dsa):

Just press enter. You must then copy the public key that you will find in .ssh/id_dsa.pub to the file .ssh/authorized_keys of the distant host you want to give access to. This public key should have the following format.

  ssh-dss AAAAB3NzaC................................................................................. login@machine   


Convert Images

  convert *.png video.gif


Make sure to specify the correct dimension for the image (here 840x1188). -160 means the image is to remove 160 units from the right part of the image. (+160 for the left part). -600 means the reduction will be of 600 units from the bottom of the image.

  convert 000.png -crop 840x1188-160-600 000_crop.png