Questions tagged [hard-drive]

GENERAL HARDWARE SUPPORT IS OFF-TOPIC. Questions about hardware should be asked on https://superuser.com. A hard drive is a physical storage device used to save state for operating systems and individual software programs. Questions should relate to reading and writing via programming.

649 questions
4
votes
2 answers

Moving Xampp's htdocs folder to external USB 2.0 hard disk

As I build many virtual webs on localhost and the data of htdocs folder is increasing everyday. I want to move the htdocs folder to external hard disk, is it possible to do that? I try editing httpd.conf file. But when I open localhost, it shows…
ronaldtgi
  • 687
  • 8
  • 17
4
votes
2 answers

Is there a way to programatically control harddrive activity lights on linux?

Just like in the main question, is there a way to do this? (Other than inducing a high io load) Maybe some facility deep down in the kernel that controls this? I'm looking to write a little script to identify failed drives in my software raid array.…
rnavarro
  • 173
  • 1
  • 4
  • 12
4
votes
1 answer

Disk seek time measurement method

I write a script to measure seek times on a HDD and a small change in how its done results in dramatically different times. First cycle makes jumps within an area at beginning of the disk. Second cycle selects random areas (of same size) on disk…
ArekBulski
  • 4,520
  • 4
  • 39
  • 61
4
votes
2 answers

How can we get Disk Performance info in C#

I want to get the following information about the disk performance. I used MSStorageDriver_FailurePredictThresholds, MSStorageDriver_ATAPISmartData, MSStorageDriver_FailurePredictStatus class to get relative information but not getting the right…
user6271345
4
votes
1 answer

Run apple script after mac resumes from sleep mode

I want my macbook to run a script each time it resumes from sleep mode. My code is extremely simple: tell application "Finder" if exists (disk "HDD") then do shell script "diskutil eject HDD" else do shell script…
WYSIWYG
  • 137
  • 2
  • 2
  • 7
4
votes
1 answer

Detect if hard disk is being accessed or not

I am trying to make a very simple hard disk access monitor to work like those embedded LEDs that blink according to drive usage. That LED REALLY helps me, but the laptop I am using does not have it. =[ So, I've made a simple tray icon application,…
LuckyScooby
  • 81
  • 10
4
votes
3 answers

Are disk file operations faster if executed in parallel?

Consider there are N files to be completely written to disk (i.e. flushed from all file buffers). For each file we write a small (relative to HDD seek time) amount of data, e.g. 64KB, with WriteFile, and then call FlushFileBuffers on that file to…
Serge Rogatch
  • 13,865
  • 7
  • 86
  • 158
4
votes
1 answer

Is it a good idea to read multiple files at the same time?

One of our company's server has 32 CPUs, and we have 1000+ very large files to be processed. I'm not sure if it is a good idea to read 32 files at the same time so all cores can perform independent calculations at the same time too. Could anyone…
vvofdcx
  • 509
  • 1
  • 6
  • 20
4
votes
3 answers

C++ IO with Hard Drive

I was wondering if there was any kind of portable (Mac&Windows) method of reading and writing to the hard drive which goes beyond iostream.h, in particular features like getting a list of all the files in a folder, moving files around, etc. I was…
Tomas
  • 1,379
  • 1
  • 13
  • 20
4
votes
1 answer

How long can I expect grep to take on a 10 TB file?

I have a 10 TB file with words from multiple books, and I'm trying to grep for some uncommon strings (no regex). For example: grep "cappucino" filename I'm trying to estimate how long this will take. I'm not really looking for whether it's the…
Popcorn
  • 5,188
  • 12
  • 54
  • 87
4
votes
1 answer

Extending huge array using hard drive

Because of science reasons I'm solving nine men's morris game. I'm trying to save information about some subset of games states. Unfortunately I reached my memory limit. I have few very huge array. When new elements came I need to extend these…
Ari
  • 3,101
  • 2
  • 27
  • 49
4
votes
3 answers

Detect external hard drive after letter changed in Python

I am writing a Python program to scan and keep track of files on several external hard drives. It keeps the file path as a string in a local file. The problem is that sometimes when I plug the external HDD into different computer, the letter change,…
ndminh92
  • 43
  • 3
4
votes
5 answers

How do I detected whether a hard drive is connected via USB?

I am trying to write a little backup program for friends and family and want it to be as simple to use a possible. I don't want to have to ask the user where to backup their data to, I just want to search for and use the first USB hard drive…
Stacey Richards
  • 6,536
  • 7
  • 38
  • 40
4
votes
2 answers

See disk management info with c#

When I open Disk Management (right click My Computer->Manage) I see: How can I know that path F:\ belongs to Disk5? In other words I will like to know what disks are available with C#. The reason why I need to know that is because I have a usb…
Tono Nam
  • 34,064
  • 78
  • 298
  • 470
4
votes
1 answer

LRU cache on hard drive python

I want to be able to decorate a function as you would do with functools.lru_cache, however, I want the results to be cached on the hard drive and not in memory. Looking around, I get a feeling this is a solved problem, and I was wondering if anyone…
dardila2
  • 79
  • 1
  • 5