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

What is a filesystem protocol and how does it work?

Just as example I will pick up Plan9's filesystem protocol called 9P (a.k.a Styx). As the article in Wikipedia states: 9P is a network protocol developed (...) as the means of connecting the components of a Plan 9 system I want to know, from…
Rizo
  • 3,003
  • 5
  • 34
  • 49
4
votes
2 answers

macOS cannot delete folder with a sunlnk flags

When I try to copy some folders in /usr/local to a standard user's folder, I find there is a folder named 'local' I cannot delete, even with # rm -rf local rm: local: Operation not permitted it tell me "Operation not permitted", but I do have the…
cjhang
  • 95
  • 7
4
votes
0 answers

FSEvents Directory Watcher for remote server volume / only works for locally initiated changes, not remote updates?

Scenario: I am using FSEvents to monitor local watch folders successfully. Using the same FSEVents code to monitor a directory that is within a mounted volume from a remote server over say, AFS (/Volumes/example) successfully notifies my FSEVents…
vade
  • 702
  • 4
  • 22
4
votes
1 answer

Filter for JSON files that contain part of an array

I have a function that allows me to filter out certain JSON files using another JSON object as filter. See code: public Map> loadFilter(Coll coll, JsonObject filter){ // Create Ret Map
4
votes
1 answer

How can I determine the canonical path of a file without following symbolic links?

Assume I have the following java.io.File and the corresponding java.nio.file.Path objects: final String windir = "WINNT"; final String comspec = "cmd.exe"; final File absoluteFile = new…
Bass
  • 4,977
  • 2
  • 36
  • 82
4
votes
1 answer

SQL - Convert non-null adjacency list to path

I am working with some tables that represent a file system, and I need to select the full path of each folder as a flattened string. The first table lists the details of each folder: CREATE TABLE Folders( FolderID int IDENTITY(1,1) NOT NULL, …
JamesFaix
  • 8,050
  • 9
  • 37
  • 73
4
votes
1 answer

Get-ChildItem vs. direct use of the .NET Framework's [System.IO.Directory]::GetFiles() method with UNC paths

When using a UNC path (ex: \\machine\share\dir), I can get a file list when using the dir command (Get-ChildItem) from a UNC path, but if I try [System.IO.Directory]::GetFiles, I get an empty list (not an error, just no items). I thought that PS…
Dweeberly
  • 4,668
  • 2
  • 22
  • 41
4
votes
1 answer

Create a directory and get the handle by issuing one IRP

When we create a file by CreateFile, the file created and we get the handle. But CreateDirectory doesn't return directory's handle. I'd like to also get the handle when I create a directory. I want to handle this by issuing only one I/O request…
Benjamin
  • 10,085
  • 19
  • 80
  • 130
4
votes
0 answers

Nodejs: synchronously wait until file appears on fs

I have the following problem: need synchronously wait until a file exists on a certain path. More details on my case: Files are created by other process. I'm patching node's require which is only sync. No way work it around with async way. So I can…
WHITECOLOR
  • 24,996
  • 37
  • 121
  • 181
4
votes
0 answers

How can I determine if a block is occupied in Linux through an ioctl call?

In Linux, we can call the FIBMAP() ioctl to determine which blocks a file occupies within a file system. What I am curious about is- how can I determine if any random block is occupied with a file (or any data). Is there an ioctl to do this as…
4
votes
0 answers

Docker: readonly filesystem error

I am required to a create container (docker run), run an application like gams and then destroy the container. for a load test I repeat this a 1000 times. by the end of this test, RHEL7 complains about a 'readonly filesystem' or 'segmentation fault'…
Tims
  • 627
  • 7
  • 19
4
votes
0 answers

Why does a 1-byte size file occupies 8 blocks in hard drive in ext4 filesystem?

I've ran into a scenario where I've created a simple plain text file with just one ASCII letter: a. I checked the file size with stat and here's what I got: $ stat file File: 'file' Size: 1 Blocks: 8 IO Block: 4096 regular…
GIZ
  • 4,409
  • 1
  • 24
  • 43
4
votes
9 answers

OS from Scratch

Although the title is part of my question, the second part won't be as simple. The First part: Let's say I want to create my own operating system. How do I even go about doing that? I understand I have to create a bootloader. But where do I go…
4
votes
1 answer

Putting file to S3 right after it's created

I have two machines with different Java applications that both run on Linux and use a common Windows share folder. One app is triggering another to generate a specific file (e.g. image/pdf). Then the first app tries to upload the generated file to…
4
votes
3 answers

Ubuntu wrongly shows low disk space

I installed Ubuntu 14.0 on virtual box. Initially I had allocated 10 GB for the .vdi. I increased it to 25 GB. When I check the size in the settings in virtual box, its showing correctly as 25GB. See below: But I am frequently getting error…
Somename
  • 3,376
  • 16
  • 42
  • 84