CSE 390a Editing and Moving Files

Slides:



Advertisements
Similar presentations
Client-server practices DSC340 Mike Pangburn. Agenda Overview of client-server development Editing on client (e.g., Notepad) or directly on server (e.g.,
Advertisements

Linux, it's not Windows A short introduction to the sub-department's computer systems Gareth Thomas.
Learning Unix/Linux Bioinformatics Orientation 2008 Eric Bishop.
Virtual Machine and UNIX. What is a VM? VM stands for Virtual Machine. It is a software emulation of hardware. By using a VM, you can have the same hardware.
1 CSE 390 Lecture 10 Do anything from anywhere – tools to free your choice of OS slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson.
Remote access and file transfer Getting files on and off Bio-Linux.
The Unix Environment and Compiling. Getting Set Up Your programs will be compiled and tested on the Departmental server ‘linprog’ The linprog servers.
CSE 326: Your Computing Environment Steve Martin Aiman Erbad.
MCB Lecture #3 Sept 2/14 Intro to UNIX terminal.
Eucalyptus Virtual Machines Running Maven, Tomcat, and Mysql.
Essential Unix at ACEnet Joey Bernard, Computational Research Consultant.
CENT 305 Information Systems Security Linux Introduction.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
HTML Hyper Text Markup Language A simple introduction.
1 CSE 390 Lecture 9 Do anything from anywhere – tools to free your choice of OS slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson.
UNIX Introduction CSCE 221H Texas A&M University.
Next Unix Topics Tuesday, 2/11 & 18/2014. Change Password (by 2/14/14) ssh to account on – faclinux.cse.ohio-state.edu – stdlinux.cse.ohio-state.edu passwd.
1 CSE 303 Lecture 3 bash shell continued: processes; multi-user systems; combining commands read Linux Pocket Guide pp , , , 118, 122,
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson
City Cluster Quickstart Lien-Chi Lai, COLA Lab, Department of Mathematics, NTU 2010/05/11.
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson
Unix Servers Used in This Class  Two Unix servers set up in CS department will be used for some programming projects  Machine name: eustis.eecs.ucf.edu.
1 Getting Started with C++ Part 2 Linux. 2 Getting Started on Linux Now we will look at Linux. See how to copy files between Windows and Linux Compile.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
 Last lesson, the Windows Operating System was discussed along with the Windows command shell  Unix is a computer operating system, that similarly manages.
1 CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CS 120 Extra: The CS1 Server Tarik Booker CS 120.
Introduction to LINUX command line Allegra Via IBBE, National Research Council, Italy Sapienza Università di Roma, Italy EMBO Practical Course on Computational.
1 CSE 391 Lecture 10 Do anything from anywhere – tools to free your choice of OS slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson.
Assignprelim.1 Assignment Preliminaries © 2012 B. Wilkinson/Clayton Ferner. Modification date: Jan 16a, 2014.
Review Why do we use protection levels? Why do we use constructors?
Tutorial Six Linux Basics CompSci Semester Two 2016.
Do anything from anywhere – tools to free your choice of OS
Class Projects and Environment
CS1010: Intro Workshop.
slides created by Marty Stepp, modified by Josh Goodwin
Tutorial Six Recap & Linux Basics CompSci Semester Two 2016.
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Andy Wang Object Oriented Programming in C++ COP 3330
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Part 3 – Remote Connection, File Transfer, Remote Environments
Assignment Preliminaries
Do anything from anywhere – tools to free your choice of OS
Intro to UNIX System and Homework 1
CSE 390a Lecture 1 introduction to Linux/Unix environment
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
slides created by Marty Stepp, modified by Jessica Miller
Do anything from anywhere – tools to free your choice of OS
Multi-user systems; remote login; editors; users/groups; permissions
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Do anything from anywhere – tools to free your choice of OS
Do anything from anywhere – tools to free your choice of OS
introduction to Linux/Unix environment
Do anything from anywhere – tools to free your choice of OS
CGS 3175: Internet Applications Fall 2009
Andy Wang Object Oriented Programming in C++ COP 3330
Do anything from anywhere – tools to free your choice of OS
Class Projects and Environment
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
slides created by Marty Stepp, modified by Jessica Miller
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 390a Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
introduction to Linux/Unix environment
Video Notes.
DIBBs Brown Dog Tutorial Setup
CSE 391 Lecture 3 bash shell continued: processes; multi-user systems; remote login; editors slides created by Marty Stepp, modified by Jessica Miller.
Presentation transcript:

CSE 390a Editing and Moving Files Tips for moving files around to/from attu slides created by Marty Stepp, modified by Jessica Miller and Ruth Anderson http://www.cs.washington.edu/390a/

Remote Connections: to a linux machine You’ve seen remote connections to a Linux machine in action Departmental attu.cs.washington.edu Linux server Can use ssh (or PuTTy) from anywhere – independent of location and OS

Connecting with ssh Linux/Unix are built to be used in multi-user environments where several users are logged in to the same machine at the same time users can be logged in either locally or via the network You can connect to other Linux/Unix servers with ssh once connected, you can run commands on the remote server other users might also be connected; you can interact with them can connect even from other operating systems command description ssh open a shell on a remote server there are actually several physical computers that respond as attu (to spread the load), so if you want to be on the same physical machine as your friend, you may need to connect to attu2, attu3, etc.

The attu server attu : The UW CSE department's shared Linux server connect to attu by typing: ssh attu.cs.washington.edu (or ssh username@attu.cs.washington.edu if your Linux system's user name is different than your CSE user name) Note: There are several computers that respond as attu (to spread load), so if you want to be on the same machine as your friend, you may need to connect to attu2, attu3, etc. Connect to the server attu.cs.washington.edu using SSH. See who else is logged in to the server. Send one of those people a message.

Options for Moving Files command description sftp or scp transfer files to/from a remote server (after starting sftp, use get and put commands) wget download from a URL to a file curl download from a URL and output to console

scp – secure copy Basic format: scp copyThisFileOrDir newLocation To copy myfile from here to my home dir on attu, and call it newfile: scp myfile rea@attu.cs.washington.edu:newfile To copy myfile from my home dir on attu to here: scp rea@attu.cs.washington.edu:myfile . To copy the contents of mydir from here to my home dir on attu: scp –r mydir rea@attu.cs.washington.edu: More info: http://linux.die.net/man/1/scp

sftp – secure file transfer program Basic format: sftp [user@]hostname (e.g. sftp rea@attu.cs.washington.edu) The basic usage is as if you have transported yourself to a directory on the machine you are sftping to and then you use the get command to move files from the remote directory to your local directory. You use put to move files from your local directory to the remote directory. Other than get or put there are various commands to move around on both the local and the remote directory and see the contents of both directories (cd and lcd, ls and lls). More info: http://linux.die.net/man/1/sftp

sftp vs. scp sftp is nice if you don't remember exactly where you want to put/get a file to/from on the remote machine. sftp allows you to move around between directories on both machines. It also only asks you for your password when you start sftp, not on each transfer. If you just want to move a single file or directory (use scp -r) and you know where you want to put it/where it is, then scp is easier as you just type one command. If you need to look around in remote directories to find the file you are looking for or even how many files or what the name of the file you are looking for, then sftp is useful. There are also graphical versions of sftp that basically operate as a drag and drop folder interface - you may have already used these.

Mounting remote files An alternate usage model to remotely connecting to servers is mounting remote directories and files and work on them locally once mounted, use remote directories and files as if they were local To mount a remote directory create a local directory to mount to mkdir csehomedir mount your remote files on your local system sshfs username@attu.cs.washington.edu:/homes/iws/username csehomedir/ command description sshfs mount and interact with remote directories and files Slide 15 in lecture 3 describes one other way of accessing remote files, basically it allows you to set up a local directory that is "linked to" a remote directory just for this login session. This allows you to copy files to/from the "remote directory" just by copying to/from the local directory. Kind of like setting up a soft link except that it is to a remote directory and it only lasts for your current login session. Unlike a link, you have to actually create the local directory you will use before calling sshfs. Details can be found on slide 15. Going back to why you would use different things, this can be thought of as a more "permanent" connection for moving lots of files back and forth vs. scp or sftp.

Text editors you cannot run graphical programs when connected to attu (yet) so if you want to edit documents, you need to use a text-only editor most advanced Unix/Linux users learn emacs or vi these editors are powerful but complicated and hard to learn we recommend the simpler nano (hotkeys are shown on screen) command description pico or nano simple but crappy text editors (recommended) emacs complicated text editor vi or vim

Remote editing Gnome's file browser and gedit text editor are capable of opening files on a remote server and editing them from your computer press Ctrl-L to type in a network location to open