Anything related to disk-like storage media, like hard-disks, CDs, DVDs, etc. By extension it could be applied to other mass storage media that are commonly referred as "disks", like SSD, flash cards, etc.
Questions tagged [disk]
1293 questions
14
votes
1 answer
Flush disk write cache from Windows CLI
Does anyone know how to flush the disk write cache data from the cache manager for the current directory (or any given file or directory, for that matter), from a Windows command line?

Brian
- 3,457
- 4
- 31
- 41
13
votes
1 answer
Disable or flush page cache on Windows
I assume Windows has a similar concept to Linux's page cache for storing in memory data from disks, like files, executables and dynamic libraries. I wonder if it is possible at all to disable such cache or to the very least to clear/flush it.

redblackbit
- 816
- 8
- 12
12
votes
3 answers
How do I copy a locked file directly from the disk and make sure that the file is intact?
The application I am writing needs to be able to copy files that are locked. We attempted to use Volume Shadow Copy, and while it was successful in copying the file, the application that had the lock on the file crashed because it could not acquire…

Eric Milas
- 1,807
- 2
- 18
- 29
12
votes
7 answers
In Python, how do I check if a drive exists w/o throwing an error for removable drives?
Here's what I have so far:
import os.path as op
for d in map(chr, range(98, 123)): #drives b-z
if not op.isdir(d + ':/'): continue
The problem is that it pops up a "No Disk" error box in Windows:
maya.exe - No Disk: There is no disk in
the…

jedmao
- 10,224
- 11
- 59
- 65
12
votes
4 answers
Cross platform way to list disk drives on Linux, Windows and Mac using Python?
I am using Python2.6. I am trying to list the disk drives that a system may have.
On Windows, it may be something like C:/, D:/, E:/, etc. On Linux, it may be something like /boot, /media/SDCard, etc. And I don't know what it's like on a Mac. Maybe…

Thomas O
- 6,026
- 12
- 42
- 60
11
votes
4 answers
Generate disk usage graphs/charts with CLI only tools in Linux
In this question someone asked for ways to display disk usage in Linux. I'd like to take this one step further down the cli-path... how about a shell script that takes the output from something like a reasonable answer to the previous question and…

nybergh
- 231
- 1
- 3
- 9
11
votes
6 answers
Constant Write Speed to Disk
I'm writing real-time data to an empty spinning disk sequentially. (EDIT: It doesn't have to be sequential, as long as I can read it back as if it was sequential.) The data arrives at a rate of 100 MB/s and the disks have an average write speed of…

ronag
- 49,529
- 25
- 126
- 221
10
votes
1 answer
IO Other Operations Performance Counter Explanation
I have received perfmon counters from customer site. We noticed unusual values in \\COMPUTERNAME\Process(PROCESS_NAME)\**IO Other Operations/sec**.
The best explanation for the counter I came up with is:-
The average rate at which the process
is…

Boris
- 1,311
- 13
- 39
10
votes
1 answer
Open Raw Disk and Get Size OS X
Using the following code, I'm able to successfully open a raw disk on my machine, but when I get the disk length I get 0 each time...
// Where "Path" is /dev/rdisk1 -- is rdisk1 versus disk1 the proper way to open a raw disk?
Device = open(Path,…

Lander
- 3,369
- 2
- 37
- 53
10
votes
0 answers
How can java application (macOS Catalina) request access to network volume?
My app is completely written in java (we moved to java11 from java8) and was running fine under High Sierra:
new RandomAccessFile(file_on_network_volume, "rws") gained access and execution continued.
Running under Catalina it fails with…

macwirbelkvit
- 103
- 5
10
votes
4 answers
How to access a data structure from a currently running Python process on Linux?
I have a long-running Python process that is generating more data than I planned for. My results are stored in a list that will be serialized (pickled) and written to disk when the program completes -- if it gets that far. But at this rate, it's…

Shahin
- 188
- 1
- 10
10
votes
7 answers
Initialization failed for Block pool (Datanode Uuid unassigned)
What is the source of this error and how could it be fixed?
2015-11-29 19:40:04,670 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for Block pool (Datanode Uuid unassigned) service to…

Mona Jalal
- 34,860
- 64
- 239
- 408
10
votes
1 answer
How to download files directly to disk on the iPhone os?
I would like to download files directly from an URL to the disk using objective-c on the iPhone os.
Currently I am using NSURLConnection to send a synchronousRequest, writing the returned NSData into a file.
How can I change the download handling…

favo
- 5,426
- 9
- 42
- 61
10
votes
1 answer
How do we determine whether a size is base on 1000 or 1024 when we see kb or mb
There are many programs in Linux which would show the size of a file, some of them show it in blocks, some are in bytes. But when it comes to some human readable form, like ls -sh, lvs, dd bs=size and so many, how do we decide if it's a multiple of…

dspjm
- 5,473
- 6
- 41
- 62
10
votes
5 answers
How to empty/flush Windows READ disk cache in C#?
If I am trying to determine the read speed of a drive, I can code a routine to write files to a filesystem and then read those files back. Unfortunately, this doesn't give an accurate read speed because Windows does disk read caching.
Is there a…

Pretzel
- 8,141
- 16
- 59
- 84