Use Terminal To Move Photo Library

NSA aside, Apple makes it difficult for users to extract and download text messages from their iPhones onto a computer. For whatever reason (legal, devious, neurotic, etc), we've all found a time where we'd like to save backups of certain meaningful, important, or perhaps incriminating conversations (including all MMS or iMessage pictures and videos). Copy the Photos Library from your Pictures Folder to an external disk. Hold down the option (or alt) key and launch Photos. From the resulting menu select 'Other Library' and navigate to the new location. You'll get a message that says: 'This library contains items that need to download from iCloud Photo Library.' To transfer your photos library from an Apple Mac to an external drive, you first need to locate the photos or a folder you wish to move. You can right-click and copy, then paste in the new location. Dragging and dropping will also copy the images or folder. For the step-by-step process, look below.

  1. Use Terminal To Move Photo Library Files
  2. Use Terminal To Move Photo Library To External Storage
Use Terminal To Move Photo Library

At this point in the course, you can:

  • see where you are in your system (pwd)

  • list the contents of a directory (ls)

  • change directories (cd)

  • make directories (mkdir)

  • make files (touch file-name.extension)

  • use keyboard shortcuts to avoid command line typing hassles

Now, you might want to move around or copy content that you've created. There are a series of commands that will allow you to do this.

Move content

Let's say you've accidentally created a file in the wrong place, like putting your biology research spreadsheet in your art history folder. 😖

If you use a visual interface like Finder (or another visual interface), you would have to click and drag this file into its correct location. In Terminal, you don't have a visual interface, so you'll have to know the mvcommand to do this!

mv , of course stands for move. The mv command requires several pieces of information.

  • the original file we want to move.

  • the new destination for the original file.

My first piece of information is therefore research-findings.csv , and my second piece of information is therefore the file path to the Biology folder.

Absolute and relative file paths

I could type this in two different ways. Let's explore the difference between absolute and relative file paths.

Option 1 (absolute path):

Option 2 (relative path):

Option 1 contains the absolute path towards the Biology folder. Each folder is listed in the path from top to bottom.

Option 2 is a relative path . It is the path relative to where we are now. . indicates 'move up one level' (to 'Second semester'), and from there, move into the Biology folder.

Rename content using mv

You can also rename files and folders using the mv command. To rename research-findings.csv to biology-final-report.csv , you could run:

Use Terminal To Move Photo Library Files

Skyrim add dragon souls command. Technically, you're 'moving' the one file to another and renaming it in the process. 👍

You can also use mv with folders in order to move them! It's not just for files.

Copying files

Copying content works similarly to moving content. Let's start with copying a file because it's simpler.

The same arguments are true for cp (copy) as for mv (move): Open rft file.

  • The first argument is the original file we want to move.

  • The second argument is the new destination for the copy of the original file.

Let's run through an exercise to put together a few different things we've worked on.

Watch the chapter video for an easier-to-understand demo! It's hard to process these concepts, and seeing the video will help a lot.

Scenario: you want to copy the final coursework from your second semester folder to a new folder called 'Final papers'. You don't want to move the files; just copy them to a different folder so you can have copies of your final papers in one centralized place.

Use Terminal To Move Photo Library To External Storage

From within 'Second semester' folder, make a directory to contain the end of semester work.

Now, you can either change directories (cd) into the Art history folder and copy the final paper from there, or just copy it without changing directories.

Robots 2005 pc game free download. or

Now change directories (cd) into the Final papers folder and list its contents (ls) to confirm the file is now copied here:

Brilliant!

Optional study: copying folders

Copying folders is more tricky. You will need to use something called an option. Options exist for many terminal commands. They are a way for you to tell the computer that a command should run in a specific, non-default way.

To copy folders, you'll use the recursive option. Recursive is similar to iteration, in that the command will run in small increments in order to achieve its final goal. This is not worth worrying about right now, though you can read more about recursiveness here.

For this example, we'll hop back to our code project. I want to duplicate my code folder in order to use the code I've written as a base for another project. The original directory is called code-project, so I'll name my copy code-project-2.

To copy this folder from one place to another, you'll run:

Terminal

This copied my code-project folder (including its contents) into a new folder called code-project-2. The -R is an option that specifies you want the command to run with recursion.

Now you can move and copy files and folders. Nice! In the next chapter, you'll see how to search for content among all the folders and files you've created in this course so far.