Running Windows native commands (e.g. VOL) from Cygwin

12,257

Launch cmd.exe from within Cygwin with the /C switch and the command in quotes:

cmd /C "vol F:"

Share:
12,257
Kev
Author by

Kev

I have been programming almost since the cradle. I am mostly based in Europe and remote (or mostly remote) programming jobs for EUR or CHF are my ideal. If you don't mind the time zone difference, I have successfully worked with North American companies from here before (EST and PST, but it depends on your requirements.)

Updated on June 05, 2022

Comments

  • Kev
    Kev about 2 years

    I have a CentOS box able to access a Windows box's Cygwin via ssh. I want to run ssh me@windowsbox 'vol F:' in a script to capture the name and serial number of a plugged-in USB drive, but I get:

    bash: vol: command not found
    

    I would just run the path to vol.exe, but there's no such thing: VOL is built into cmd.exe.

    How can I use VOL in Cygwin?