
<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 to the server 2) Some 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: Start Putty 2) Mac + Linux: Open a terminal 3) Connecting to server via ssh -l <login> 192.168.11.4 4) Enter 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 (parent working directory) </p><p><strong>Usage</strong>: pwd <ENTER> <strong>Example</strong>: pwd <ENTER> </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 (list) </p><p><strong>Usage</strong>: ls -l <FOLDER> <ENTER> // list all files and directory one on each line </p><p>ls -la <FOLDER> <ENTER> // show also hidden files ls -lh <FOLDER> <ENTER> // show e.g. files sizes in human- </p><p>friendly version </p><p><strong>Example</strong>: ls -l <ENTER> </p><p>ls -lh /home/mbuechler <ENTER> </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 (change directory) </p><p><strong>Usage</strong>: cd <FOLDER> <ENTER> // change to <folder> <strong>Example</strong>: cd ~ <ENTER> // change to „home folder“ cd /storage <ENTER> </p><ul style="display: flex;"><li style="flex:1"> </li><li style="flex:1"> cd .. <ENTER> </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 (make directory) </p><p><strong>Usage</strong>: mkdir <FOLDER> <ENTER> // change to folder <strong>Example</strong>: mkdir /storage/mbuechler <ENTER> // creates a directory in /storage called mbuechler </p><p>mkdir /storage/mbuechler/test <ENTER> <br> // 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 (copy file) </p><p><strong>Usage</strong>: cp <PATH_TO_FILE> <TARGET_FOLDER> <ENTER> <strong>Example</strong>: cp /storage/HelloWorld.jar /storage/mbuechler <ENTER> // 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 (removes directory or file) </p><p><strong>Usage</strong>: rm -r <PATH_TO_FILE_OR_FOLDER> <ENTER> <strong>Example</strong>: rm /storage/mbuechler/test <ENTER> </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 (run a java programme) </p><p><strong>Usage</strong>: java -Xmx1g -Dproperty=value -jar <programme> <ENTER> </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 (vi improved) </p><p><strong>Usage</strong>: vim <file_name> <ENTER> <strong>Example</strong>: vim .bash_profile (use 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 UTF-8 editors are able to display the encoding (e.g. on the bottom) 2) If 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: 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 you made sure your .txt files are COPIED to your (cygwin) user directory: </p><p>$ file *.txt </p><p>5) Depending on the output, list all possible encodings: </p><p>$ iconv -l </p><p>6) And re-encode (e.g. Windows Hebrew to UTF-8): </p><p>$ iconv -f CP1255 -t UTF-8 in.txt > 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>
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages15 Page
-
File Size-