Is it my or what. USB drive navigating
OK. I've looked all over the net for this. I have ubuntu running in virtualbox so I can learn linux. My boss wants to me to install some drivers on an HP thin client that runs linux of course with no GUI. So I'm trying to get used to the terminal etc..
I'm trying to navigate to my usb drive. Just simply cd (my usb drive) all over the net I find info about how to mount my drive. Ubuntu mounts my drive for me I don't need to mount it. I've run dmesg and fdisk etc.. and found out that the drive is on sdb. So how to I cd to sdb. I tried from the dev folder, I tried from the media folder. I just want to cd into the usb drive. Why is linux so insanely difficult to understand? But thats beside the point. |
oks so I found it in the media folder. Now I'm trying to delete a folder so I can clean up and move my driver into an easy to locate folder. rmdir is not working it says the directory is not empty. Who cares I stil want it removed. rmdir (folder). Now what am I doing wrong?
|
ok so I'm slowly figuring this out. Now I'm getting that I cant access a folder. Says no folder. I've got my case right. cd (foldername). No such file or directory. Now what am I doing wrong?
|
Let me give more info. $ cd Linux Drivers. Whats wrong with that command?
|
As it tells you in the man page, rmdir normally removes empty directories, as a safety precaution. What you need is
rm -rf /path/to/dir The parameter -r makes the remove command recursive and -f (force) stops it from asking permission for every file of subdirectory. |
Spaces need to be delimited, or the directory name needs to be in quotes
Code:
cd Linux\ Drivers Code:
cd "Linux Drivers" Code:
cd Linux<tab> |
Quote:
Code:
man rmdir |
Lots of things! If your current directory was /home/fred, then
cd Downloads would change it to /home/fred/Downloads, while cd /etc would go to /etc. You typed cd Linux Drivers so that would look for /Linux inside your current directory and then wonder what to do with the "Drivers" bit. |
Quote:
The entries in /dev/ are the raw devices. This is something that Windows hides from you, which is probably why you're confused. Windows only shows you mounted drives, Linux shows you both. If the drive is auto-mounted, you can use "df" to see where it is. If it's not auto-mounted, then you can use fdisk to find the device name, and then use mount to mount it wherever you want: "mount /dev/sdb1 /path/to/mount/location" |
to add to the great information above. some basics for dealing with USB devices in Linux. this is generalized, not specific to any distro.
tail -f /var/log/messages can be used AS YOU PLUG the USB device into the system to find its location in the computer: Code:
[root@centos ~]# tail -f /var/log/messages the combination of df, and mount will allow you to see what is mounted before and after you manually mount the USB drive: Code:
[root@centos ~]# df -Th now I can cd directly to the USB device at its mount point and view what is on the drive. I can also use pwd to show you exactly were you are located in the system: Code:
[root@centos ~]# cd /mnt/usb Code:
[root@centos usb]# df -Th |
Ya ok. That helps. To clarify I'm on an hp thin client and I guess the man command is left out. But yes that was the info I needed from you guys. Thanks.
|
All times are GMT -5. The time now is 01:10 PM. |