Sunday, March 31, 2013

How to change directory and transfer files to USB with the command line



You will sometimes need to use the command line to access the USB and transfer files from or to it. This usually happens when something wrong happens to X or when you try to install everything from scratches like with Arch Linux. To change the directory or transfer files to a USB from the command line, you just need to know the name of the USB.

Just open the terminal and from your home folder, type:

 cd /media  

Then:
 ls  

And you will see the name of the USB and other mounted devices.

To change directory or transfer files to the USB or the mounted devices, just copy paste the name after /media like this:
 cd /media/name-of-USB  

In case the name of the USB has spaces, you will need to use the quote marks ("") around its name. Here is how it looks in the terminal in my box:


No comments:

Post a Comment