Usb drive, how to locate it, how to move folder from Usb drive to usr directory
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Usb drive, how to locate it, how to move folder from Usb drive to usr directory
hi
I want to move a folder from USB drive to desktop, any directory, let say usr directory. But don't know what the name for usb drive and where to find it, i know i am going to use mv command. Please give me instruction on how to do this, thanks
Your USB device will be /dev/sd[b,c,d,...] (depending on how many other drives you have). Some systems (like those with Gnome) automatically mount your USB drive to something like /media/DEVICENAME (depending on the usb drive's name, id number). If you need to mount it manually, you can do:
Code:
sudo mount /dev/sdb /mnt
(where sdb is the usb drive). After that, you can do:
Code:
mv /mnt/somedir $HOME/Desktop
Keep in mind, mv will put the file/dir in the new location and delete it from the old location. cp will make a copy.
Well, if you only have one hard drive in your computer, it's probably going to be sdb, and depending on whether or not you have it partitioned, it might be sdb1 sdb2, etc. You might be able to get a definitive answer by checking the output of
If you know the UUID of the file system the folder is on then you can mount the file system:
Code:
mount /dev/disk/by-uuid/<the UUID> /<some mount directory>
for example
Code:
mount /dev/disk/by-uuid/efa8a079-ab80-41c9-b018-85810dd3c45d /mnt
.
You can find out the UUID by examining the links in /dev/disk/by-uuid/ and then plugging in the USB HDD; a new link should appear pointing to the /dev/s[a-][1-] device that has just been created.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.