Enrique Soriano, Gorka Guardiola Laboratorio de Sistemas, Grupo de Sistemas y Comunicaciones, URJC 29 de septiembre de 2011
(cc) 2010 Grupo de Sistemas y Comunicaciones. Some rights reserved. This work is provided under Creative Commons Attribution License - NonCommercial - NoDerivs (by-nc-nd). To obtain the complete license go to http://creativecommons.org/licenses/by-sa/2.1/es. or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
Panel: application menu Applications: Terminal: Aplicaciones Accesorios Terminal Navegador: Aplicaciones Internet Firefox Editor: Aplicaciones Programación Editor de textos SciTE Trick: To create a launcher drag and drop the icon onto the Desktop or Panel.
Panel: places in the file explorer Folders: Home ($HOME): Lugares Carpeta Personal Desktop: Lugares Escritorio
Filesystem tree
File explorer Directories (folders) contain files and other directories. Similar to Windows and Mac OS X. Copy, paste, cut...
Editing files with SciTE Different ways to open a file File Open Drag and drop the file to an already open SciTE. Dragging the file to the SciTE icon. Typing in the terminal (recommended): scite file-name.p
Compiling After saving the file. Different ways: Typing in the terminal: pick file-name.p En SciTE: Tools Compile. En SciTE: click in the hammer button in the Tool bar.
Basic commands man: asking the system for help about something. man cp apropos: find about something in the man pages. apropos copy
Basic commands pwd: print the working directory (the one currently being used). cd: change the working directory. cd mydir1 ls: list the contents of a directory ls mydir1 ls -l
Basic commands mkdir: create directories mkdir midir2 cp: copy files. cp fich1 fich2 cp fich1 fich2 midir1 mv: move files. mv fich1 fich2 mv fich2 fich3 midir1
rm: delete files (BE CAREFUL!). rm fich1 fich2 rm -r midir1 CAREFUL cat: see the contents of files. cat fich4 cat fich4 fich5
Paths Absolute path: string of directories starting from the root separated by slashes. Always starts with slash (root). /home/al-09-10/juan/file.txt Relative path: string of directories starting with the working directory. al-09-10/juan/file.txt.. : father directory.../juan/file.txt. : current directory../file.txt
Executable files./ to tell the system that it is in the current directory../myprogram or the absolute path: /home/al-09-10/juan/myprogram You can add the current directory to the places where executables are searched (default configuration in the lab): export PATH=.:$PATH
Command line tricks to repeat already executed commands. Tab to complete names Ctrl+r to search in the already executed commands.
Copy files Windows: Install this app: Winscp MacOSX http://winscp.net/eng/docs/lang:es In Finder: Ir Conect to server In the command line: scp Linux In the file explorer: Lugares Conectar con servidor (seleccionar SSH) In the command line: scp
Remote console Windows: Install this app: Putty http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html MacOSX In the command line: ssh Linux In the command line: ssh
Example with scp Copy a file from a remote server to the local machine (for example, from the lab to my home terminal): scp your-login@servidor:origin-filename destitnation-filename Examples: scp juan@zeta01.aulas.gsyc.es:expr.p expr.p (copies the file expr.p from juan s home directory to the working directory in juan s PC) scp juan@zeta22.aulas.gsyc.es:desktop/a.txt a.txt (copy the file a.txt from juan s Desktop directory in the server to the local directory in his PC)
Example with scp Copy a file from the local machine to a remote server (for example, from my home terminal to the lab): scp origin-filename your-login@servidor:destination-filename Example: scp a.txt juan@zeta22.aulas.gsyc.es:desktop/a.txt (copy the file a.txt from the local directory in his PC to juan s Desktop directory in the server)