mount

Give the mount point of a path

The following, very non-robust shell code will give the mount point of $path: (for i in $(df|cut -c 63-99); do case $path in $i*) echo $i;; esac; done) | tail -n 1 Is there a better way to do this? Postscript This script is really awful, but has the redeeming quality that it Works On My Systems. Note that several mount points may...

How to mount a network directory using python?

I need to mount a directory "dir" on a network machine "data" using python on a linux machine I know that I can send the command via command line: mkdir ~/mnt/data_dir mount -t data:/dir/ /mnt/data_dir but how would I send that command from a python script? ...

Cross-platform solution for mounting a custom filesystem

I have a need to make my data part of the machine's file system. In windows it seems I have 3 options: Eldos' "Callback File System" (http://www.eldos.com/cbfs/) Dokan (dokan-dev.net) Pismo File Mount (http://www.pismotechnic.com/pfm/) Of these 3 option 1 (Eldos) is by far the best looking option. But ideally I would like to get a...

How to run a script on device mount in OSX.

I want to make a script that automatically backs up my kindle files when I connect it to my macbook pro. Writing the script is well within my ability, but I don't know what's the best way to run a script on mount automatically. ...

How can I mount network drive in Mac OS X on Java?

I am writing a programme on JBuider 2005 on Windows XP platform for Mac OS X. Programme must launch on Mac OS X and programme turnes(directs) to share folders on other computer(Windows XP) in network. It is necessary that then we launch nprogramme on Mac OS X this programme automatically mount these share folders under Mac OS X. Then pro...

Where is a file mounted?

Given a path to a file or directory, how can I determine the mount point for that file? For example, if /tmp is mounted as a tmpfs filesystem then given the file name /tmp/foo/bar I want to know that it's stored on a tmpfs rooted at /tmp. This will be in C++ and I'd like to avoid invoking external commands via system(). The code should ...

VMWare-Mount not recognizing virtual disks

I have two disks as .vmdk files, and four as .vdi files. I can boot virtual machines on them with Sun xMV VirtualBox, and they work just fine. However, I want to mount them on my local computer so I can read some files off of them without starting a virtual machine. I downloaded the vmware-mount utility, but I get this error: Unable to ...

How do I notice when something gets mounted.

I want my program always know all of the mountpoints. After a quick google I found that getmntent() and friends can tell me what is mounted. I realize I could do this everytime that I needed to know what was mounted, but is there some way to recognise when something gets mounted/unmounted so I don't have to keep reading the file? Is t...

mounting without -o loop

Hi, I have written a dummy (ram disk) block device driver for linux kernel. When the driver is loaded, I can see it as /dev/mybd. I can successfully transfer data onto it using dd command, compare the copied data successfully. The problem is that when I create ext2/3 filesystem on it, I have to use -o loop option with the mount command...

Virtual drive tool problem?

Is there any way to mount rar to a virtual disk? is it possible? ...

how mount userdata.img or userdata-qemu.img in osx

Disk Utility in OSX easily mounts an SD Card image as a device, but not so the other img files. I want to get the database I just created in the Android Emulator off the drive and into my osx file system. I updated my system with qemu using macports but no combination I try succeeds. Anyone figured out how to do this? Obviously one wa...

On Solaris, how do you mount a second zfs system disk for diagnostics?

I've got two hard disks in my computer, and have installed Solaris 10u8 on the first and Opensolaris 2010.3 (dev onnv_134) on the second. Both systems uses ZFS and were independently created with a zpool name of 'rpool'. While running Solaris 10u8 on the first disk, how do I mount the second ZFS hard disk (at /dev/dsk/c1d1s0) on an arb...

How do I get the server hostname from a mounted directory with cocoa/obj-c?

Currently when I open a file with my program I can select files on a server by clicking on the server name in the sidebar in an NSOpenPanel and then selecting the file. No problem, this works fine for using the file as long as the shared directory is mounted. I get a path like "/Volumes/SHARENAME/filename.bla". My question is how do...

mount command pid

Trying to mount a device and get the pid of mount command. cmd="/bin/mount /dev/sda1 /mnt" os.system(cmd) Now how to obtain the pid of mount command? There plenty of mounted device available on my system, something like ps | grep mount won't work. ...

(re)mounting the SD card on android emulator

On the emulator, I can unmount the SD card from the Settings. I can then mount it on my OS, then unmount it normally. I haven't been able to figure out how to re-mount it then on the emulator (without rebooting it). hints: the adb command remount is unrelated: it's about /system the emulator command is unrelated: it's only about sta...

How can I get mounted name and (Drive letter too) on Windows using python

I am using Daemon tool to mount an ISO image on Windows XP machine.I do mount using Daemon command (daemon.exe -mount 0,iso_path). Above command will mount ISO image to device number. In my case I have 4 partition (C,D,E,F) and G for DVD/CD-RW. Now what happen, ISO gets mounted to drive letter 'H:' with name (as defined while creating I...

manually put files to android emulator sd card

Hi guys, I'm just having trouble with getting my emulator SD card work... I created a new AVD device with a new SD card. So how to put data onto it? I found the "correct" file to be mountet on Deamon tools, but is currupt or simply not readable... It would be great if you have any idea :) ...

Is there a way to let NetBeans work with Amazon-ec2 disk space?

Hello, I'm sick of using vim to develop on some far Amazon-ec2 machine. I'm wondering if there is any way to Use NetBeans on my laptop to develop on and run the code on that machine. Basically I want a way to let NetBeans operate on an external disk space that I connect to using SSH, In my case I'm using Mac OS X 10.6.3 locally and the...

How can I specify the name of a mounted drive in Windows when mounting programmatically?

I am writing a perl routine that mounts specific drives at startup. However, when the drives are mounted, they appear in "My Computer" with odd names like "dir$ at 'machinename' (H:)". Is there a way in perl or C to specify this string (or just the 'dir$' part?) at mount-time? ...

How to mount EC2 volume persistnantly as it losts files when I stop the instance in LINUX?

I mounted volume by following it gets mounted but files get lost after stop. mkfs -t ext2 /dev/sdb mkdir /mnt/myVol mount /dev/sdb /mnt/myVol ...