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 Code:
mv /mnt/somedir $HOME/Desktop |
thanks
when i do lsusb this is what i have Bus 005 Device 002: ID 0781:5406 sandisk corp 4Gb flash drive and some other below that with different ID, so how do I know this drive is sd(b,c,or d) thanks |
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
Code:
ls -l /dev/disk/by-id |
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> 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. |
Usb drive, how to locate it, how to move folder from Usb drive to usr directory
Hi,
Just use the below command to know ur new USB-HDD media connected. # fdisk -l The above command will give the output of all the Usb-Hdd media connected to the particular Host. You can just examine the drives and confirm the respective drive and mount it if it is not already mounted. After that use the below command to copy the particular dir from Usb-Hdd to ur Desktop. # cp -r /mnt/<dir> $HOME/Desktop [this cmd will copy the directory] # mv /mnt/<dir> $HOME/Desktop [this cmd will move ie cut and paste the directory] Please let me know if u r not clear. Regards, rhadmn |
All times are GMT -5. The time now is 09:35 AM. |