Questions tagged [filesystems]

A file system is a way of organizing data on a computer system. Typically a file system consists of files, folders (normally a special kind of file) and an API that can be used for interacting with files.

File Systems (or filesystems)

A file system is the specification of how files in a computer should be logically stored, named and organized. File systems present to users a human-readable format of data organization in the computer, where each file is a discrete unit of data.

File systems present only a logical format. They don't necessarily reflect the way the data is physically stored on a computer disk drive, or other storage device. Since the computer actually stores data in bits, data on a storage device lacks any structure; consisting of nothing more than a series of 1s and 0s.

File systems therefore give structure and meaning to that data, by — at the very minimum — giving an arbitrary collection of bits a file name and maintaining a record of this file physical location on the storage device.

Common Elements

Other than file names, common file systems also describe and maintain directories and file attributes, which serve as a means to further structure data organization and to give files specific purposes, security features or functionality.

File systems usually store this information in table-like format in a specific region of the storage device. Each file is listed on this table with its location, length and other properties clearly declared. An operating system that understands the filesystem format can then read this table to access a file in order to edit, rename, delete, move or alter any of its attributes.

For more reading

File System, at Wikipedia

Various file system specifications

9576 questions
4
votes
1 answer

Finding size of deleted open file in Linux?

I'm aware of all the hoopla around deleted open files in Linux still hanging around and taking space on the file system. What I'm after is to find the size of these deleted open files. sudo find /proc/[0-9]*/fd -ls | grep '(deleted)' gives me the…
Capt. Crunch
  • 4,490
  • 6
  • 32
  • 38
4
votes
4 answers

Getting safe temp folder in Windows

I need to get a safe temp folder where I could store temporary files for my application, but so far my research has lead me to conclusion that all approaches I've found are flawed. The first idea was to use GetTempPath function, but that causes two…
Coder
  • 3,695
  • 7
  • 27
  • 42
4
votes
3 answers

Files on Windows and Contiguous Sectors

Is there a way to guarantee that a file on Windows (using the NTFS file system) will use contiguous sectors on the hard disk? In other words, the first chunk of the file will be stored in a certain sector, the second chunk of the file will be stored…
Terry
  • 581
  • 3
  • 9
  • 17
4
votes
3 answers

How to build a file path correctly by using php?

I have a directory and a dynamic file name. Are there any functions I can use to make sure it is impossible to break out from the specified directory? for example: secure_path('/tmp/', 'file.txt') -> /tmp/file.txt secure_path('/tmp/', '../file.txt')…
Philip
  • 151
  • 2
  • 9
4
votes
5 answers

How to create a directory in memory? pseudo file system / virtual directory

For my usecase, I would like to have an in memory directory to store some files for a very short time. Actually I compile source code to .class files at runtime, classload and execute them. The clean way would be to create a virtual directory and…
Stefan K.
  • 7,701
  • 6
  • 52
  • 64
4
votes
0 answers

How to set the hidden attribute on a Windows directory in Rust?

I see how to create a file with the attribute. let file = OpenOptions::new() .write(true) .create(true) .attributes(winapi::FILE_ATTRIBUTE_HIDDEN) .open("foo.txt"); I also see that std::os::windows::fs::MetadataExt will return…
marathon
  • 7,881
  • 17
  • 74
  • 137
4
votes
1 answer

Nodejs, to get file type of a file

The six-year-old question "Node.js - File System get file type, solution around year 2012" has a better answer but the outdated answer was the correct one by then. Hence the question, for an up-to-date solution.
xpt
  • 20,363
  • 37
  • 127
  • 216
4
votes
1 answer

How many files is most advised to have in a Windows folder (NTFS)?

we have a project that constitutes a large archive of image files... We try to split them into sub-folders within the main archive folder. Each sub-folder contains up to 2500 files in it. For…
Denis
  • 4,718
  • 5
  • 18
  • 20
4
votes
1 answer

How to randomly sample files from a filesystem in Python

Is there a performant way to sample files from a file system until you hit a target sample size in Python? For example, let's say I have 10 million files in an arbitrarily nested folder structure and I want a sample of 20,000 files. Currently, for…
lifebythedrop
  • 401
  • 3
  • 18
4
votes
0 answers

Does NTFS store the hash or CRC32 of every inode/file, how to access it?

I know how to read a file, pass these bytes to a hashing algorithm such as MD5SUM, SHA256 or CRC32, and get the hash. Here I'm asking something slightly different: Each time we write/modify a file on a NTFS partition, does it re-compute a hash or…
Basj
  • 41,386
  • 99
  • 383
  • 673
4
votes
1 answer

How do you Store Millions of Images on your Server?

Possible Duplicate: Storing a large number of images Hello, I want to be able to scale to millions of user profile pics on my LAMP Server using PHP. I currently store all images in one folder, which is a big no-no, so I want to spread them out…
PleaseHelpMe
  • 709
  • 3
  • 8
  • 13
4
votes
2 answers

Win32API function to join directories?

Does the Win32 API have a function for joining two paths? I can't find it, so I thought I'd ask before rolling my own.
Cristian Diaconescu
  • 34,633
  • 32
  • 143
  • 233
4
votes
2 answers

How to filter hidden files after calling MATLAB's dir function

Using MATLAB, I need to extract an array of "valid" files from a directory. By valid, I mean they must not be a directory and they must not be a hidden file. Filtering out directories is easy enough because the structure that dir returns has a…
JnBrymn
  • 24,245
  • 28
  • 105
  • 147
4
votes
1 answer

FS based on a database without using fuse

To serve millions of files out of a single directory, being able to connect to a drive from hundreds of endpoints, and for some other reasons (to avoid gluster/nfs/all fs based networking solutions), I want to evaluate the possibility of making a…
Devrim
  • 2,826
  • 5
  • 25
  • 31
4
votes
6 answers

How to store audio files in server (during hosting)

I was thinking of building an app to serve audio content. The first question I get is how to store it. Two obvious solutions that occur are: Dump in database as BLOB Dump in filesystem, and store path in DB There was a similar question here and…
Suraj Chandran
  • 24,433
  • 12
  • 63
  • 94