I need to start/stop an external hard drive (USB) from a shell or python script. Actually the external hard drive automatically stops when ejected. So, is it possible to programmatically eject / start an external hard drive? Something like USBDeview does for Windows :-)  Update:  My intended use case: I want to run a nightly backup to the external drive. As the drive is quite loud and to save on energy, I only want it to be active during the backup. I likely won't use Time Machine, but my own backup script.
120904
Is it possible to manually put an external hard disk to sleep? Right now, I've already got "Put the hard disks to sleep when possible" checkmarked in the Energy Saver preference pane, and so they should sleep after 10 minutes of inactivity, but I'm wondering if it's also possible to do this manually whenever I want.  I just bought an external hard drive and it's already spinning constantly, compared to my current external which is completely quiet, so I'm wondering if I can put it to sleep when I need to to stop it from spinning all the time.
28273
I don't know how , but somehow automatic power-off of usb devices got accidentally enabled. Now my usb mouse goes off even if it's idle for 2-3 seconds. It's really irritating.  This happened after I installed powertop and powernap. Maybe it has something to do with these two applications.  How can I disable this "feature"?
89571
Windows asks me to reformat every time I plug it into my computer, so I fired up Ubuntu via VirtualBox (selecting the external hard drive in the USB settings for VirtualBox beforehand) to see if I can access it there.  Does anyone have any suggestions for me? I have over 1TB of data on this drive and do not want to lose it. When I plug it into an electrical outlet, the light turns on, and when I plug it into my laptop, I can feel it clicking.
51975
Sometimes when I follow the process to safely remove a USB flash drive, I get told that I can't remove the drive because some programs are using it. However I'm unable to tell which programs these are, so I end up having to close programs - sometimes even randomly.   How do I find out which program is using my USB flash drive?  I've searched the Internet but have found nothing promising; one solution might be via Process Explorer since it shows handles, but I don't know how to use it to solve my problem.  The best solution would be to have a program that can automatically close these programs for me, or at least tell me which programs these are.
21190
It is possible to use autorun.inf on a CD rom to make it run an exe without prompting the user but the same is not possible on a USB drive. Why? If its possible, how? On a USB drive it just prompts the user to select an action.
93899
I have a Python script that needs to execute an external program, but for some reason fails.  If I have the following script:  import os; os.system("C:\\Temp\\a b c\\Notepad.exe"); raw_input();   Then it fails with the following error:     'C:\Temp\a' is not recognized as an internal or external command, operable program or batch file.   If I escape the program with quotes:  import os; os.system('"C:\\Temp\\a b c\\Notepad.exe"'); raw_input();   Then it works. However, if I add a parameter, it stops working again:  import os; os.system('"C:\\Temp\\a b c\\Notepad.exe" "C:\\test.txt"'); raw_input();   What is the right way to execute a program and wait for it to complete? I do not need to read output from it, as it is a visual program that does a job and then just exits, but I need to wait for it to complete.  Also note, moving the program to a non-spaced path is not an option either.    This does not work either:  import os; os.system("'C:\\Temp\\a b c\\Notepad.exe'"); raw_input();   Note the swapped single/double quotes.  With or without a parameter to Notepad here, it fails with the error message     The filename, directory name, or volume label syntax is incorrect.
50801
When you unplug an USB drive without unmounting, your OS warns you about how dreadful could be such operation for your devices (I'm on OSX).  I usually follow the advice, unmounting before unplugging, but it happened many times (thousands) that, at the end of my tasks, I just unplugged (Hd storage, Cell phones, etc..) and I never ever noticed corrupted data on my devices. Am I lucky or can this annoying warning just be ignored?
88906
I want to install Windows 7 on an external hard drive, and boot from it when needed.   Is this possible on a Mac? I have heard from some sources that it is not possible to boot Windows from external drives, at least on the new Macs. I found this quite surprising.   Any idea if this is true?
875
I have scripts that expect specific drive letters for hard drives. Windows sometimes assigns the different drive letters (e.g. I expected my Maxtor drive to be E:, but it's now F:, therefore my scripts will fail), depending on the order of how the drives are plugged into my laptop.  In Windows 7, how do I assign a permanent drive letter to a drive?
59075
When I've plugged in my USB HDD (WD Passort Elite) for the first time, the system had asked me whether I want to use this HDD as time machine drive. I've chosen smth like 'decide later' and continued my work. When later I tried to setup time machine preferences I couldn't find the way to set my USB HDD as time machine drive. When I press 'Select drive for backup' i see empty list, nevertheless my drive is plugged in and works well. Btw, it is ntfs-formatted, could it be a problem?  Thanks in advance
90472
I have an external HDD with a USB 3.0 connection. When I connect it to the USB 3.0 port on my laptop, it works fine but when I eject it, it gets remounted immediately.  This doesn't happen when I connect the same drive to a USB 2.0 port.  At the moment I'm unmounting (clicking the "eject" button in Nautilus) instead.   Is there a way to avoid this issue?
92919
When my Seagate external hard drive is plugged in, its $RECYCLE.BIN folder automatically contains all the files contained in the Recycle Bin of the PC. Is it true that actually we don't have any Recycle Bin of external hard drive, rather it is the Recycle Bin of the PC? Why is it so?
70603
Is it possible to find out which files are transferred to an external usb flash drive in certain period of time?   To be more clear. If I/someone have a flash drive and take some data from me. How do I know which files are copied? Finding out file copy hostory could be also a work around.
50645
Q: How to open a web site automatically when inserting a USB.  I currently have 2 files on it:  autorun.inf start.url   autorun.inf contains 3 lines:  [autorun]   ShellExecute=start.url open=start.url   start.url contains 2 lines:  [InternetShortcut] URL=http://cnn.com   Loads ok on a Vista machine, but does not load on other XP or Windows7 machines.  Any clue what to change?
6764
How I can safely remove a USB external drive?  Ubuntu 12.10 does not come with this option, only to "Unmount" the disk, but not "Eject".    I have tried both USB sticks and with my external hard drive.
65450
I'm using Windows 8.1 with an external hard drive. My external seems to go to sleep very quickly, like in a single minute. I constantly wait 2-3 seconds when accessing files on my external harddrive (where all my important stuff is). I have not had this problem on other OSs with this same external HDD.  I checked my power settings, its supposed to wait 40 minutes before spinning down (on battery and plugged in). This is clearly not happening. What might be the problem here?
47383
I'm using Ubuntu 12.04, and when I rigth click on a my flash drive icon (in the Unity left bar) I get two options that have me confused: eject and safely remove.  The closer I came to an answer was , which concludes that (for a flash drive) they are both equal and also equivalent to use the umount command. However, this last assertion seems to be false.  If I use umount from the console to unmount my flash dive, and then I use the command lsblk, I still see my device (with nothing under MOUNTPOINT, of course). On the other hand, if I eject or safely remove my flash drive, lsblk does not list it anymore. So, my question is, what would be the console command/commands that would really reproduce the behaviour of eject and safely remove?