Introduction to Command Line and Accessing Servers Remotely

Introduction to Command Line and Accessing Servers Remotely

<p><strong>Introduction to command line and accessing servers remotely </strong></p><p>Marco Büchler, Emily Franzini, Greta Franzini, Maria Moritz </p><p><em>eTRAP Research Group Göttingen Centre for Digital Humanities Institute of Computer Science Georg August University Göttingen, Germany </em></p><p>DH Estonia 2015 - Text Reuse Hackathon </p><p>20. Oktober 2015 </p><p>Who am I? </p><p>•<br>2001/2 </p><p>2006 <br>Head of Quality Assurance department in a software company <br>•••••••<br>Diploma in Computer Science on big scale co-occurrence analysis <br>2007- 2008 2011 2013 2014- <br>Consultant for several SMEs in IT sector Technical project management of eAQUA project PI and project manager of eTRACES project PhD in „Digital Humanities“ on Text Reuse Head of Early Career Research Group eTRAP at Göttingen Centre for Digital Humanities </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>Agenda </p><p>1) Connecting&nbsp;to the server 2) Some&nbsp;command line introduction </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>Connecting to the server </p><p>1) Windows:&nbsp;Start Putty 2) Mac&nbsp;+ Linux: Open a terminal 3) Connecting&nbsp;to server via&nbsp;ssh -l &lt;login&gt; 192.168.11.4 4) Enter&nbsp;password </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>Which folder am I on the server? </p><p><strong>Command</strong>: pwd&nbsp;(parent working directory) </p><p><strong>Usage</strong>: pwd &lt;ENTER&gt; <strong>Example</strong>: pwd &lt;ENTER&gt; </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>Which files and directories are contained in my pwd? </p><p><strong>Command</strong>: ls&nbsp;(list) </p><p><strong>Usage</strong>: ls -l &lt;FOLDER&gt; &lt;ENTER&gt;&nbsp;// list all files and directory one on each line </p><p>ls -la &lt;FOLDER&gt; &lt;ENTER&gt;&nbsp;// show also hidden files ls -lh &lt;FOLDER&gt; &lt;ENTER&gt;&nbsp;// show e.g. files sizes in human- </p><p>friendly version </p><p><strong>Example</strong>: ls -l &lt;ENTER&gt; </p><p>ls -lh /home/mbuechler &lt;ENTER&gt; </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>How to change a different directory? </p><p><strong>Command</strong>: cd&nbsp;(change directory) </p><p><strong>Usage</strong>: cd &lt;FOLDER&gt; &lt;ENTER&gt;&nbsp;// change to &lt;folder&gt; <strong>Example</strong>: cd ~ &lt;ENTER&gt; // change to „home folder“ cd /storage &lt;ENTER&gt; </p><ul style="display: flex;"><li style="flex:1">&nbsp;&nbsp; </li><li style="flex:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;cd .. &lt;ENTER&gt; </li></ul><p></p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>How to create a folder? </p><p><strong>Command</strong>: mkdir&nbsp;(make directory) </p><p><strong>Usage</strong>: mkdir &lt;FOLDER&gt; &lt;ENTER&gt;&nbsp;// change to folder <strong>Example</strong>: mkdir /storage/mbuechler &lt;ENTER&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// creates a directory in /storage called mbuechler </p><p>mkdir /storage/mbuechler/test &lt;ENTER&gt; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// creates a directory in /storage/mbuechler called test </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>How to copy a file? </p><p><strong>Command</strong>: cp&nbsp;(copy file) </p><p><strong>Usage</strong>: cp &lt;PATH_TO_FILE&gt; &lt;TARGET_FOLDER&gt; &lt;ENTER&gt; <strong>Example</strong>: cp /storage/HelloWorld.jar /storage/mbuechler &lt;ENTER&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// copies HelloWorld.jar to /storage/mbuechler </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>How to remove a directory? </p><p><strong>Command</strong>: rm&nbsp;(removes directory or file) </p><p><strong>Usage</strong>:&nbsp;rm -r &lt;PATH_TO_FILE_OR_FOLDER&gt; &lt;ENTER&gt; <strong>Example</strong>: rm /storage/mbuechler/test &lt;ENTER&gt; </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>How to run a java programme? </p><p><strong>Command</strong>: java&nbsp;(run a java programme) </p><p><strong>Usage</strong>: java -Xmx1g -Dproperty=value -jar &lt;programme&gt; &lt;ENTER&gt; </p><p><strong>Example</strong>: java -jar HelloWorld.jar </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>How to edit a file? </p><p><strong>Command</strong>: vim&nbsp;(vi improved) </p><p><strong>Usage</strong>: vim &lt;file_name&gt; &lt;ENTER&gt; <strong>Example</strong>: vim .bash_profile (use&nbsp;cd ~ first) </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>How to edit a file? </p><p><strong>vim command</strong>: </p><p>1) Change to editor modus: type <strong>„i“ </strong>(insert) 2) Leave editor modus: press <strong>ESC-button </strong>3) Leave vim without writing changes to disc: type „<strong>:q!</strong>“ 4) Leave vim with writing changes to disc: type „<strong>:wq</strong>“ </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>Edit the bash_profile </p><p><strong>vim command</strong>: </p><p>1) Change to home folder: cd /home/mbuechler 2) Edit bash_profile: vim .bash_profile 3) Add two lines for adding the correct java version: </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p><p>Encoding guide </p><p>1) Most&nbsp;UTF-8 editors are able to display the encoding (e.g. on the bottom) 2) If&nbsp;you are not sure, which encoding your data is in or have troubles to display them properly in an editor AND the file is not too big, you can try to open it in your standard text processing program (e.g.Word) to find information on the encoding. </p><p><strong>3) Windows:&nbsp;install Cygwin (</strong><a href="/goto?url=https://cygwin.com/install.html" target="_blank"><strong>https://cygwin.com/install.html</strong></a><strong>) </strong></p><p>4) After&nbsp;you made sure your .txt files are COPIED to your (cygwin) user directory: </p><p>$ file *.txt </p><p>5) Depending&nbsp;on the output, list all possible encodings: </p><p>$ iconv -l </p><p>6) And&nbsp;re-encode (e.g. Windows Hebrew to UTF-8): </p><p>$ iconv -f CP1255 -t UTF-8 in.txt &gt; out.txt </p><p></p><ul style="display: flex;"><li style="flex:1">DH Estonia 2015 - Text Reuse Hackathon </li><li style="flex:1">20. Oktober 2015 </li></ul><p></p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    15 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us