Questions tagged [disk-access]

Disk access is where a program reads or writes directly to a storage media. Use with the language tag you're trying to perform the access with.

50 questions
1
vote
1 answer

Bytes returned by "disk_usage" from the shutil library doesn't match the directory file size

I was reading the official documentation of shutil from the Python website, then I ran a disk_usage test, but it isn't returning what I was expecting, Inside that directory (folder) there's a single file of 669 kb. This is the code: import…
Jsh0s
  • 519
  • 1
  • 8
  • 18
1
vote
1 answer

Why used space calculated, for a directory, using java and 'du -sk' are different ?, and what is the exact java alternative for 'du -sk'?

Why used space calculated, for a directory, using java and 'du -sk' are different ?, also what is the exact java alternative for 'du -sk'? PFB Java Code, final String location = "/home/bhlabhla"; final Path path = Paths.get(location); …
Devas
  • 1,544
  • 4
  • 23
  • 28
1
vote
2 answers

Find directory space on disk with powershell

I wanted to know the size of my different sub-directories, so I followed the indications of Getting Directory sizes powershell and Display directory structure in powershell and some others here in SO and somewhere else. Those functions work well,…
PavoDive
  • 6,322
  • 2
  • 29
  • 55
1
vote
1 answer

as3, gamedev, file access, uncompressing is very slow

Description ~~~~~~~~~~~ I have around 100 files that represents around 450 Mo to load a game. I'm not parsing anything, just loading raw data (ByteArray). Problem ~~~~~~~ On desktop using File, loading all resources takes 46 seconds. I was thinking…
1
vote
2 answers

Matlab: direct/efficient untar to memory to avoid slow disk interactions

Given a .tar archive, Matlab allows one to extract the contained files to disk via UNTAR command. One can then manipulate the extracted files in the ordinary way. Issue: When several files are stored in a tarball, they are stored contiguously on…
Acorbe
  • 8,367
  • 5
  • 37
  • 66
1
vote
3 answers

Is there a faster way to get disk usage starting at a specific directory in powershell?

I've been using the following piece of code to get the disk usage starting at a specific directory: $usage = (Get-ChildItem $webRoot -recurse | Measure-Object -property length -sum) $diskUsage = $usage.sum The problem is that this takes a VERY long…
FrodoFraggins
  • 49
  • 1
  • 7
1
vote
1 answer

Escaping singlequote in random filenames

I have a simple bash script which outputs the total file size using 'du' However every time I pass a file that contains an apostrophe it presents me with a syntax error. So I'd like to know if there was a way to escape singlequotes without modifying…
1
vote
2 answers

Reduce number of disk access while writing to file in C

I am writing a multi-threaded application and as of now I have this idea. I have a FILE*[n] where n is a number determined at runtime. I open all the n files for reading and then multiple threads can access to read it. The computation on the data of…
Aman Deep Gautam
  • 8,091
  • 21
  • 74
  • 130
0
votes
1 answer

Cache store for .net library encapsulated classes

I am writing a dll with a number of high-level utility classes, that other developers will consume and use in their applications. Currently I am working on an implementation of a class, that has to make use of local caching of large strings,…
Maxim V. Pavlov
  • 10,303
  • 17
  • 74
  • 174
0
votes
1 answer

Meaning of the statement - du -sk * |sort -rn|head

I am facing trouble understanding the meaning of the Linux command du -sk * |sort -rn|head. I understand that du is used to display the disk usage but I'm facing trouble understanding the rest of the command. Can somebody please breakdown what's…
Dawson Smith
  • 473
  • 1
  • 6
  • 15
0
votes
1 answer

Latex rendering needs too much disk space in MediaWiki?

Not totally sure that Stackoverflow is the best place to ask this question, but since I see a slew of other MediaWiki questions that have already been posted, I suppose my question is appropriate. My understanding is that MediaWiki, in addition to…
EMiller
  • 2,792
  • 4
  • 34
  • 55
0
votes
1 answer

Calculating the total disk usage for a set of subdirectories across a directory tree?

Here is the scenario. Imagine we have this style of directory stucture - /snapshots/201801/users/tom/ /snapshots/201802/users/harry/ /snapshots/201803/users/chris/ and so on. What I'm trying to get in my output is the total disk usage of the name…
0
votes
2 answers

docker clean up container overhead

I have two docker containers running, where the diskspace is as follows: user$ sudo docker system df TYPE TOTAL ACTIVE SIZE RECLAIMABLE Images 2 1 …
Michael Hecht
  • 2,093
  • 6
  • 25
  • 37
0
votes
2 answers

Android Studio using 100% of disk

I have just installed Android Studio to follow a react native project and everytime I try to use the program the disk usage goes to 100%. I've chosen Pixel 2 as the phone and android Q and R as the versions. The program works well until I click the…
0
votes
0 answers

Difference in actual usage and disk utilized for Microsoft SQL Server 2012

I am trying to monitor database utilization for one of our applications. Issues observed are that actual utilized disk space by the database is more than the result we got by checking the utilization by using the below query. Utilized space by the…