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.
I can't remember where to find the command(s) to give me the following info:
The capacity of the usb thumb drive and how much space is left on it. Can the info be "human readable"? (in GB or MB rather than just bytes).
When I look at the properties in Konquerer, it just gives me the amount used, not its capacity and how much is left on it.
and you will see information about all the available mounted partitions, your thumb drive included.
A KDE application which shows the same info is KDiskFree. On my OpenSuse 11.1 it resides in the K menu under Applications --> System --> File System --> Disk Usage. From the command line, just type kdf and press enter.
Thanks for your replies.
@colucix: Your suggestion about using KDiskFree helped a lot. While it didn't give me any info about the usb stick, I did find another tool that did the job: KDirStat. (I'm using an older SuSE).
@repo: I did the command and it just gave me the hard drive info, and it did not include the usb stick. So, I tried it this way: df -h /dev/sda and it gave me the info. I needed
Back to the df command:
One thing I noticed, after getting the info and when my 2 gig usb is taken out and the 8 gig is put in its place and the command is repeated, the info is the same -- as if it hasn't read what is on the stick. It should give me different information. Also, if I do the command as: df -h /media/usbdisk it tells me that it has 0 items on it. I've also just noticed that the info I was being given this whole time was for tmpfs and not the usb stick.
When I use df -h it just gives me this:
Code:
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 74G 70G 3.8G 95% /
tmpfs 1013M 0 1013M 0% /dev/shm
As you can see, there is no mention of the usb disk.
It looks like the two USB sticks are not mounted automatically. Maybe, being it an old Suse release it have not plug-and-play capability. To verify, please post the output of the command
Code:
mount
(without options) when the two sticks are inserted and the fdisk -l command gives the output shown above. What if you try to mount them manually?
mount
/dev/hda2 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
usbfs on /proc/bus/usb type usbfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,noatime,fs=floppyfss,procuid)
/dev/sdb1 on /media/usbdisk type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid,utf8=true)
/dev/sda1 on /media/usbdisk_1 type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid,utf8=true)
and df -k gives the same readout as df -h.
When the usb's are plugged in, they show up right away in Konqueror as /media/usbdisk and /media/usbdisk_1.
/dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,noatime,fs=floppyfss,procuid)
/dev/sdb1 on /media/usbdisk type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid,utf8=true)
/dev/sda1 on /media/usbdisk_1 type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid,utf8=true)
These three filesystems are mounted by Submount, a kernel module whose "purpose is to automatically mount and unmount cd, floppy, and other removable media drives while remaining entirely invisible to the user" (quoted by Submount project at Sourceforge). I've never seen submount in action, hence I can't tell you anything more about how it works and how you can configure its behaviour. However, you can check your /etc/fstab and if there are entries for /dev/sda1 and /dev/sdb1 you can change the type from subfs to vfat. Hope this helps.
Edit: just out of curiosity I downloaded the source code from Sourceforge and the README file inside the installation directory explains how to setup the subfs filesystem type. Indeed, it uses fstab entries.
When I looked at the project page on sourceforge, I found a forum entry that asked if it works with things like USB flash drives (from back in 2005) and the answer from the project admin said: "if you use an automated system to detect the drive when it's plugged in, it will have to be scripted to use subfs."
I also saw that back in 2007, Gentoo dropped submount "because they have to patch it at each Kernel release."
Last edited by gymnart; 09-09-2009 at 03:51 PM.
Reason: more info
When I looked, I didn't see any entries for /dev/sda1 or sdb1.
Indeed. There are subfs entries for /dev/floppy and the CD drives, whereas the automount of USB sticks is usually managed by udev.
Quote:
When I looked at the project page on sourceforge, I found a forum entry that asked if it works with things like USB flash drives (from back in 2005) and the answer from the project admin said: "if you use an automated system to detect the drive when it's plugged in, it will have to be scripted to use subfs."
I also saw that back in 2007, Gentoo dropped submount "because they have to patch it at each Kernel release."
Yes. You have to find out which udev rule takes control of the USB mounts and which part is responsible of the Submount system. Here is a thread I followed some time ago, with some (hopefully) useful information about the udev system and its rules.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.