Linux - Newbie This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
02-28-2010, 11:41 AM
|
#1
|
|
LQ Newbie
Registered: Apr 2007
Posts: 2
Rep:
|
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
|
|
|
|
02-28-2010, 11:47 AM
|
#2
|
|
Member
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 582
Rep:
|
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.
|
|
|
|
02-28-2010, 12:25 PM
|
#3
|
|
LQ Newbie
Registered: Apr 2007
Posts: 2
Original Poster
Rep:
|
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
Last edited by eeguy02; 02-28-2010 at 01:09 PM.
Reason: more text adding
|
|
|
|
02-28-2010, 01:45 PM
|
#4
|
|
Member
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 582
Rep:
|
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
|
|
|
|
02-28-2010, 10:49 PM
|
#5
|
|
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian Squeeze (server), Slackware 13.37 (netbook), Slackware64 14.0 (desktop),
Posts: 8,357
|
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.
|
|
|
|
02-28-2010, 11:23 PM
|
#6
|
|
Member
Registered: Oct 2009
Location: Bangalore
Distribution: Redhat Linux, Solaris, CentOS
Posts: 32
Rep:
|
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
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:33 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|