Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When my camera was mounted on /media I could use the standard tools (df) to see the disk usage of the card in my camera. However now the camera is mounted using gvfs, and df seems to ignore it. I've also tried pydf and discus to no avail.

The camera is definitely available through nautilus, and when I select the camera in nautlius, the status bar tells me the amount of disk free. I can also open the ~/.gvfs/ folder in nautilus and right click on the camera folder and get the disk usage in a graphical way.

But that is no use for a script. Are there command line tools that are the equivalent of df for gvfs filesystems? Or even better, a way to make df report on gvfs filesystems?

share|improve this question
    
Check out this question. gvfs-fuse-daemon might be the workaround for this issue. This is a know bug –  devav2 Sep 1 '12 at 10:43

1 Answer 1

up vote 2 down vote accepted

I did some poking around and discovered gvfs-info does what I need.

$ gvfs-info -f ~/.gvfs/gphoto2\ mount\ on\ usb%3A002,005/
attributes:
  filesystem::size: 16017719296
  filesystem::free: 4316299264
  filesystem::type: gphoto2
  filesystem::readonly: FALSE
  filesystem::use-preview: 1
  gvfs::backend: gphoto2

Interestingly, hitting Tab at the command line changed the above command into:

gvfs-info -f gphoto2://[usb:002,005]/

Which gave exactly the same information. I did a little experiment and found that plugging the camera into a different port gave a different address, but doing a ls of ~/.gvfs/ would find the camera.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.