Skip to content
Advertisement

Tag: filesystems

Creating a new file from a cpp program in Ubuntu [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 3 years ago. Improve this question How do I create a new file from a cpp program in Ubuntu, and is it any different from windows. Answer Declare a stream class

Polling for readiness file

I work on Linux. How to know that a gzip file is ready? I have a server that polls files in directory /dir/. There is an another, independent process that gzip files to /dir/. How can my server know that file is ready? Answer There is no ready-made solution for this. Looking at the last modification timestamp of the file

Is running `sync` necessary after writing a disk image?

Common way to write an image to disk looks like: After this command, is it necessary to run sync? sync(2) explains it only flushes filesystem caches. Since dd command is not related to any filesystem, I think it is not necessary to run sync. However, block layer is complex and in doubt, most people prefers to run sync. Does anyone

Get filesystem creation date in C

I need to know the creation datetime of the filesystem on a disk (in a Linux machine) with C. I would like to avoid using shell commands, such as and make a parser. Thanks Answer From a program coded in C (or in any language capable of calling C routines) you would use the stat(2) system call (or, with recent

where is the __init function of ext4?

As every module that is to be inserted in the kernel needs an __init function. where can I find the __init function of the original ext4 module written by linus torvalds? I want to make some changes in it. Answer I suppose you’re looking for this method : https://github.com/torvalds/linux/blob/master/fs/ext4/super.c#L5781 This __initmethod is the main one of the module because it

Advertisement