Migrating your media files with the command line

Once you have installed Ubuntu and have it up and running, the next thing you will probably need to do is move your media files to onto it.  Since it is going to be used to serve up your video and audio, it is a great time to look at one of the better features of Linux: Job Control

Job control is the ability to send a command to the “background” so that you can continue to work on other things while it is running.  This can be accomplished primarily through two different ways: the bg command or the ampersand (&)

Say for example you wanted to copy files from an external hard drive to a share directory:

cp /media/external/music /home/shared

Once this command was executed you could stop the job by pressing CTRL-D and then using the bg command to restart it in the background and while leaving you an active command prompt.

Alternatively you could just append an ampersand on the end of the command and it would automatically run in the background:

cp /media/external/music /home/shared &

If you want to see the jobs that are running in the background, just use the jobs command to see any currently running jobs.  You can also use the fg command to bring a job back to the active terminal.

This makes it really easy to copy large directories from the command line without having to wait for the first to finish.  This really is just a fraction of the use you can get from the job management in Linux.  Check out some of these posts to get some more information if you’re interested:


Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: