Safe to have multiple processes writing to the same file at the same time? [CentOs 6, ext4]

What you’re doing seems perfectly OK, provided you’re using the POSIX “raw” IO syscalls such as read(), write(), lseek() and so forth. If you use C stdio (fread(), fwrite() and friends) or some other language runtime library which has its own userspace buffering, then the answer by “Tilo” is relevant, in that due to the … Read more

How many files can I put in a directory?

FAT32: Maximum number of files: 268,173,300 Maximum number of files per directory: 216 – 1 (65,535) Maximum file size: 2 GiB – 1 without LFS, 4 GiB – 1 with NTFS: Maximum number of files: 232 – 1 (4,294,967,295) Maximum file size Implementation: 244 – 26 bytes (16 TiB – 64 KiB) Theoretical: 264 – 26 bytes (16 EiB – 64 KiB) Maximum volume size Implementation: 232 – 1 clusters (256 TiB – 64 KiB) Theoretical: 264 – 1 clusters (1 YiB – 64 KiB) ext2: Maximum number of files: 1018 … Read more